6.3.90.900
21 Parameter Groups
Parameter groups are parameter-like views that represent multiple parameters.
Examples:
Use parameter groups to conveniently set multiple parameters.
For example, the plot library uses parameter groups
to save and restore appearance-controlling parameters when it must draw plots within a thunk.
Returns #t when v is a parameter group.
Defines a new parameter group.
If struct-name is not given, define-parameter-group defines a new struct <name>-value to hold the values of parameters.
If struct-name is given, it must have a constructor (struct-name param-or-group-expr ...) that accepts as many arguments as there are parameters in the group, and a struct-name match expander that accepts as many patterns as there are parameters.
Examples:
> (struct two-params (p1 p2) #:transparent) |
|
> (define-parameter-group params* (param1 param2) #:struct two-params) |
|
> (params*) |
(two-params 100 200) |
Corresponds to
parameterize, but can parameterize parameter groups as well as parameters.
Corresponds to
parameterize*, but can parameterize parameter groups as well as parameters.