Expands to a define form assigning a 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 and may be used to specify keyword arguments.
Extracts the parameter objects holding the current overloads from the multimethods 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.
|( name+args #:default method )|
|( name+args :: signature method )|
Attaches a new method implementation to the multimethod name or removes an existing one, modifying the value of the parameter holding the current overloads.
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 and an implicit first argument that receives a procedure which can be invoked through . Otherwise method must be a single expression evaluating to a procedure. In either case the resulting procedure becomes the method implementation.
If no args are given and method evaluates to #f, any existing implementation for the given signature is removed.
Inside the implicit lambda bodies created by , this form may be used to invoke the next less specific method applicable to the same signature as the current one.
The arguments passed to the next method are the same as those passed to the current method.
|( name :: preference)|
Attaches a new preference to the multimethod name or removes an existing one, modifying the value of the parameter holding the current overloads.
The given signatures are implicitly quasiquoted.
The type of preference registered or unregistered depends on the form of preference:
If (< signature-a signature-b) is specified, signature-a is registered as preferred to signature-b.
If (> signature-a signature-b) is specified, signature-b is registered as preferred to signature-a.
If (= signature-a signature-b) is specified, any preference of signature-a over signature-b or vice versa is removed.