I am learning Lisp from Practical General Lisp. At some point, I should enter the following bit of code:
[1] (remove-if-not #'evenp '(1 2 3 4 5 6 7 8 9 10))
(2 4 6 8 10)
I assume the idea here, of course, is that remove-if-not wants a function that can return T or NIL when given an argument, and that function then applies to all characters in the list, returning a list containing only those characters where he returned NIL.
However, if I write the following code in CLISP now:
[2] (remove-if-not 'evenp '(1 2 3 4 5 6 7 8 9 10)
(2 4 6 8 10)
It still works! So my question is, does the question of whether I use a notation with a sharp quote or just use a quote sufficient is relevant? Now it seems that the extra sharp is only there so that the programmer knows that "Hey, this is a function, not just some random character!" - but if he has any other use, I would like to know about it.
I am using GNU CLISP 2.49 (2010-07-07, sheesh, which is actually pretty old).
source
share