Simple generic function interface.
Define a new generic function named name
.
Each parameter should be either a single identifier or a list of the form
(param type)
where param
is the parameter name and
type
is a predicate which returns true if it's argument is of the
correct type.
Parameters without a predicate will always match.
If multiple methods satisfy the arguments, the most recent method
will be used. The special form (call-next-method)
can be
invoked to call the next most recent method with the same arguments.
Create a new first-class generic function named name
.
Extend the generic g
with a new method f
that applies when all parameters match the given list
of predicates preds
.