(require 'parameters)
Arguments to procedures in scheme are distinguished from each other by
their position in the procedure call. This can be confusing when a
procedure takes many arguments, many of which are not often used.
A parameter-list is a way of passing named information to a procedure. Procedures are also defined to set unused parameters to default values, check parameters, and combine parameter lists.
A parameter has the form (parameter-name value1
...). This format allows for more than one value per
parameter-name.
A parameter-list is a list of parameters, each with a different parameter-name.
Returns an empty parameter-list with slots for parameter-names.
parameter-name must name a valid slot of parameter-list.
parameter-list-refreturns the value of parameter parameter-name of parameter-list.
Removes the parameter parameter-name from parameter-list.
remove-parameterdoes not alter the argument parameter-list.If there are more than one parameter-name parameters, an error is signaled.
Returns parameter-list with parameter1 ... merged in.
expanders is a list of procedures whose order matches the order of the parameter-names in the call to
make-parameter-listwhich created parameter-list. For each non-false element of expanders that procedure is mapped over the corresponding parameter value and the returned parameter lists are merged into parameter-list.This process is repeated until parameter-list stops growing. The value returned from
parameter-list-expandis unspecified.
defaulters is a list of procedures whose order matches the order of the parameter-names in the call to
make-parameter-listwhich created parameter-list.fill-empty-parametersreturns a new parameter-list with each empty parameter replaced with the list returned by calling the corresponding defaulter with parameter-list as its argument.
checks is a list of procedures whose order matches the order of the parameter-names in the call to
make-parameter-listwhich created parameter-list.
check-parametersreturns parameter-list if each check of the corresponding parameter-list returns non-false. If some check returns#fa warning is signaled.
In the following procedures arities is a list of symbols. The
elements of arities can be:
singleoptionalbooleannarynary1Returns parameter-list converted to an argument list. Parameters of arity type
singleandbooleanare converted to the single value associated with them. The other arity types are converted to lists of the value(s).positions is a list of positive integers whose order matches the order of the parameter-names in the call to
make-parameter-listwhich created parameter-list. The integers specify in which argument position the corresponding parameter should appear.