Version: 4.1.4.1

3 Multimethods

 (require (planet "multimethod.ss" ("murphy" "multimethod.plt" 2 0)))

This module provides procedures and syntactic sugar to create multimethods and to attach procedures to them.

Each multimethod is a structure that can act as a procedure accepting any number of arguments and any keyword arguments. When called, it first applies a signature generator to its arguments and keyword arguments, which should produce a single result. This generated signature is then compared with the signatures for registered method implementations to find the one to call.

See find-method for a precise explanation of how methods are looked up.

This module also re-exports the exn:fail:multimethod structure defined in "overloads.ss".