RosettaCodeData/Task/Higher-order-functions/Common-Lisp/higher-order-functions.lisp

10 lines
162 B
Common Lisp
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
CL-USER> (defun add (a b) (+ a b))
ADD
CL-USER> (add 1 2)
3
CL-USER> (defun call-it (fn x y)
(funcall fn x y))
CALL-IT
CL-USER> (call-it #'add 1 2)
3