Je travaille sur un programme dans LISP, en utilisant CLISP pour exécuter le programme.Lisp, Alors que la fonction d'erreur non définie avec CLISP?
Ma fonction a une while en elle, mais CLISP revient
*** - EVAL: undefined function WHILE
Fonction n'a rien d'extraordinaire,
(defun heap-insert (heap item key)
"Put an item into a heap. [Page 150 CL&R]."
;; Note that ITEM is the value to be inserted, and KEY is a function
;; that extracts the numeric value from the item.
(vector-push-extend nil heap)
(let ((i (- (length heap) 1))
(val (funcall key item)))
(while (and (> i 0) (>= (heap-val heap (heap-parent i) key) val))
do (setf (aref heap i) (aref heap (heap-parent i))
i (heap-parent i)))
(setf (aref heap i) item)))