1
I want to return the smallest value of a list with an iterative function in Lisp. The code I have is this::
(defun rmin (lista)
(let ((minim (first lista))) (loop for a in (lista) (if (< a minim) (minim a))) minim))
My idea was to replace the initial variable (minim)
for a
when it finds a lower value in the list, and at the end of the cycle returns the lower value found.
Which compiler or interpreter you are using to run the program?
– Gomiero