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

10 lines
162 B
Common Lisp

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