I have the following LISP code
(defun l (x y) (list x y))
when I do (l a a) I get an error that A has no value.
I want this to return (a a). How can I overcome this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think what you mean is that you want a list of “symbols”. When a symbol is bound to a value, then it becomes a variable. You can do this by “quoting” the symbols when you pass it to your
lfunction:Recommended reading: http://www.gigamonkeys.com/book/syntax-and-semantics.html