:Keywords and their use
Posted: Wed Jan 13, 2010 6:22 pm
Hi all,
I'm struggling to understand the use of keywords. I understand that keywords evaluate to themselves, thus :A is :A. But take the following code:
If I were to run that, it would return NIL because member is using eql instead of equal (I think), thus if I write:
It will return the list, as it should. However, I do not understand why you have to use :TEST. How do you know what to name these keywords, and what is their use?
I'm struggling to understand the use of keywords. I understand that keywords evaluate to themselves, thus :A is :A. But take the following code:
Code: Select all
(member '(c cat) '((b bird) (c cat) (d dog) (s squirrel)))
Code: Select all
(member '(c cat) '((b bird) (c cat) (d dog) (s squirrel)) :TEST #'EQUAL)