Name

defun*

Usage

special-form

Syntax

(defun* name (arg* [doc-string] form*) (. ".."))

Description

Defines a multi-arity function.

user > (defun* f
           (() (self 0))
           ((x) (self x x))
           ((x y) (+ x y)))
it: f
user > (f)
it: 0
user > (f 3)
it: 6
user > (f 3 4)
it: 7

See also

defun lambda lambda*