Possible Duplicate:
What does # mean in LISP
I am learning lisp, but one thing I do not understand is why it is necessary for #’ to be used. If a function with a specific name exists, why would lisp think its a variable?
Ex:
>(remove-if-not #'evenp '(1 2 3 4 5 6 7 8 9 10))
(2 4 6 8 10)
Some lisps, like Common Lisp, require this. Others, like Scheme, do not.
You need to do this because the Lisp you’re using has a separate namespace for functions versus “normal” variables. If you left out the
#'then the symbolevenpwould be interpreted as referring to the “normal” (non-function) namespace.