Definition macro
Defines a constant binding in the current module and initializes it to a new function.
define {adjective}* function name parameter-list
[ body ]
end [ function ] [ name ]
dylan
dylan
Creates a constant module binding with the name name, and initializes it to a new function described by parameter-list, options, and any adjectives.
The adjectives permitted depend on the implementation.
The parameter-list describes the number and types of the function's arguments and return values. It is an error to supply #next in the parameter list, and there is no implicit #next parameter.
The following functions return the same values as they would if the function had been defined as a bare method with the same signature:
function-specializers function-arguments function-return-values
Calling some of the following reflective operations on a function defined with define function may be an error:
generic-function-methods add-method generic-function-mandatory-keywords sorted-applicable-methods find-method remove-method applicable-method?