[previous] [up] [next]     [contents] [index]
Next: Specifying a Parameterization Up: Parameterizations Previous: Parameter Utilities

Parameterization Utilities

(make-parameterization base-p) returns a new parameterization, copying its initial parameter values from the parameterization base-p. If base-p is not provided, the current parameterization is used.

(make-parameterization-with-sharing base-p share-from params f) returns a new parameterization with parameter values initialized from the parameterization base-p. The share-from, params, and f arguments together determine whether and how parameter values in the new parameterization are shared with existing parameterizations. If a parameter value is shared by two parameterizations, obtaining or setting the value of the parameter in one parameterization is the same as obtaining or setting the value in the other parameterization.

The share-from argument is either a parameterization or #f; if share-from is a parameterization, then parameters are shared with share-from by default, otherwise parameters are not shared by default. The default sharing can be overridden through the params and f arguments.

The params argument is a list of parameter procedures for distinct parameters; the f procedure is applied individually to each parameter procedure in params. For each parameter procedure, f returns either #f or a parameterization. A #f return value indicates that the parameter for the given procedure is not to be shared, while a parameterization return value inidicates that the parameter is to be shared with that parameterization.

(parameterization? v) returns #t if v is a parameterization, #f otherwise.



PLT