Lisp Adjacent Elements Product
(defun adjacent-elements-product (input-array)
(let ((vec (coerce input-array 'vector))
(max-product most-negative-fixnum))
(dotimes (i (1- (length vec)))
(setf max-product (max max-product (* (aref vec i) (aref vec (1+ i))))))
max-product))
This walks through neighboring values, multiplies each pair, and keeps the biggest product it finds.