LISP Absolute Difference function

(defun absdiff (x y)
      (if (< x y) (- y x) (- x y))
)

> absdiff 3 5 = 2

Comments