In the following Lisp REPL interaction:
CL-USER> (defparameter *unison* 0)
*UNISON*
CL-USER> (member *unison* '(*unison*))
NIL
why is nil returned?
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.
Because the
*unison*variable is bound to0, and the list has only a*unison*symbol since it’s quoted. Try this in comparison:This will actually evaluate the second
*unison*which returns0, resulting in a(0)list.