The total length will typically appear in the AutoCAD or a pop-up alert box. Technical Background: AutoLISP Running TLEN LISP in AutoCAD query - CADTutor
If you’re happy with Clojure or Common Lisp, you might not switch. But if you’ve ever thought:
(let !counter 0 (each! [1 2 3] (fn [x] (set! counter (+ counter x)))) counter) ;; returns 6