defun
special-form
(defun name (arg*) [doc-string] form*)
Defines a global function.
make-html > (defun f (x y) (+ x y))
it: f
make-html > (f 21 34)
it: 55
With optional parameters:
make-html > (defun f (x &optional (y 2)) (+ x y))
it: f
make-html > (f 3 4)
it: 7
make-html > (f 3)
it: 5
With named parameters:
make-html > (defun f (x &key (y 2) (z 3)) (+ x y z))
it: f
make-html > (f 3 :y 4)
it: 10
make-html > (f 3 :z 9 :y 77)
it: 89