Version: 4.1.3.9
2.2 Wrapper Protocol
(make-pmultimethod m) → pmultimethod? |
m : multimethod? |
Takes the multimethod m and wraps it in an object that behaves identically when it is called as a procedure. The new object stores the multimethod in a parameter.
This way you can have the advantages of parameterization, which can be handy for dynamically adding or removing methods or preferences, without syntactic differences to regular procedures or multimethods stored in normal variables.
(pmultimethod? v) → boolean? |
v : any/c |
Checks whether the given object is a parameter multimethod wrapper.
(pmultimethod-parameter pm) → (parameter/c multimethod?) |
pm : pmultimethod? |
Extracts the parameter object holding the multimethod from a wrapper.
(pmultimethod->multimethod pm) → multimethod? |
pm : pmultimethod? |
Extracts the current value of the parameter object holding the multimethod in a wrapper.