function - LISP - what does CONS need to work? -
function - LISP - what does CONS need to work? -
i had question in exam, how solve it? cons fundamental mutual lisp function. functionality must mutual lisp environment provide create work? happen code without it?
(defun test(n l1 l2) (when (plusp n) (append l1 l2) (something (1- n) l1 l2)))
prompt> (test fourtytwo '(4) '(2))
from perspective?
from language implementer need memory , info type takes 2 pointers , perhaps flags type , gc unless it's embedded in pointer.
for developer needs 2 arguments holding data. both reader , append uses without won't have cons cells , therefor not lists either.
function lisp common-lisp environment cons
Comments
Post a Comment