Version: 4.1.3.9
2.3 Syntactic Sugar
(define-multi name+args :: signature | options ...) |
|
|
name+args | | = | | (name . args) | | | | | | name |
|
Expands to a define form assigning a parameter wrapped
multimethod to name.
If args are given, signature is implicitly wrapped
in a lambda expression with args as arguments. Otherwise
signature must evaluate to a procedure. In either case the
resulting procedure becomes the signature generator of the new
multimethod.
The options are passed on to make-multimethod and
may be used to specify keyword arguments.
(parameterize-multi (name ...) | expr ...) |
|
|
|
Extracts the parameter objects from the multimethod wrappers given
by name ... and parameterizes them to their current values for
the dynamic extent of expr ....
This is useful to install methods or preferences temporarily.
(define-method name+args #:default method ...) |
(define-method name+args :: signature method ...) |
|
name+args | | = | | (name . args) | | | | | | name |
|
|
|
Attaches a new method implementation to the parameter wrapped
multimethod name and stores the resulting new multimethod
back into the parameter.
The signature for the new method is either the default signature of
the multimethod, if #:default is specified, or the given
signature. signature is implicitly quasiquoted.
If args are given, the method body specified by
method ... is implicitly wrapped in a lambda expression
with args as arguments. Otherwise method must be a
single expression evaluating to a procedure. In either case the
resulting procedure becomes the method implementation.