(defun life-universe ()
(let ((k 0)
(flag t))
(setf k (read))
(labels ((chef (k flag)
(when (and flag (not (= k 42)))
(print k))
(if (= k 42)
(setf flag nil)
(if (or (< k 0) (>= k 100))
(return-from chef 0)))
(setf k (read))
(chef k flag)))
(chef k flag)))
(return-from life-universe 0))
(life-universe)
I am new to common lisp and code chef and this is the code i wrote for the TEST problem, the very first one in the easy section of the practice problems. I get NZEC error, i tried using sbcl exit and quit functions, still i get it. The return-from function also doesnt seem to work. Where am i going wrong?
Thanks.