Saturday, September 23, 2006

Pass function as parameter in lisp

Several students asked me about the approach to pass a function as a parameter.
Here is the method.

Suppose you have a function B, and you wanna call A with a function parameter, then
you can call like this:
(A #'B)

#' is mostly the same as quote. But typically, #' denotes a function. quote is to represent a list.

-Lei

No comments: