How do I return a list without performing a function on it?
Posted: Wed Feb 03, 2010 8:05 pm
If I want to return a list or nil how do I do that? If I just try to put the name of the list or nil on the last line, lisp tells me it's not a function. I've been using the print function but that isn't going to cut it anymore.
For example
For example
Code: Select all
(defun goalp (state)
(let ((x state))
(loop for i from 0 to 7 do
(if (not(equal (+ i 1) (nth i state)))
(setf x nil)
(print nil)))
(print x)))