- fxmapping-ref fxmap k #!optional failure successprocedure
The optional failure parameter is a procedure of type [] → * …. The optional success parameter is a procedure of type * → * …. success defaults to values.
If an association (k, v) occurs in fxmap, then success is invoked in tail context on v and its values are returned. If k does not have an association in fxmap and failure is supplied, then it is invoked in tail context on no arguments and its values are returned. Otherwise, it is an error.
Examples:
(fxmapping-ref (fxmapping 36864 'zap) 36864) ⇒ zap (fxmapping-ref (fxmapping 0 'a) 36864) ⇒ ; error (fxmapping-ref (fxmapping 0 "worf") 0 (lambda () #f) string-length) ⇒ 4