total-difference
Posted on March 22nd, 2004 by Sacha Chua
(defun sacha/total-difference (list)
"Computes the sum of the differences between successive items in LIST."
(let ((distance 0))
(while (cdr list)
(setq distance (+ (abs (- (car list) (car (cdr list)))) distance))
(setq list (cdr list)))
distance))
I used this to calculate the total distance travelled by a read/write
head given the list of tracks.
I'm 