fn arg {form}* | [Macro] |
Creates a function. If arg is a symbol then fn is equivalent to the functionspecial form and the #' read macro: (fn +) = (function +) = #'+. If argis a list then fn defines an anonymous lambda: (fn (x) (random x)) = (function (lambda (x) (random x))) = #'(lambda (x) (random x))
Example:
? (setf x (items in function with (fn () (cons 1 (random 9))))) #<FUNCTIONAL-ITEM-STREAM 133341111>> ? (read-items x 4) ((1 . 2) (1 . 1) (1 . 6) (1 . 2))