jeudi 19 juin 2014

LISP - what does CONS need to work?


Vote count:

0




I had this question in an exam, how would you solve it? CONS is a fundamental Common Lisp function. Which functionality must the Common Lisp environment provide to make it work? What would happen to this code without it?


(defun test(n l1 l2) (when (plusp n) (append l1 l2) (something (1- n) l1 l2)))


prompt> (test fourtytwo '(4) '(2))



asked 3 mins ago






Aucun commentaire:

Enregistrer un commentaire