multimethod
Multimethod refers to a programming construct in which a function or operation is selected at runtime based on the types of more than one of its arguments. Also called multiple dispatch, it generalizes single-dispatch methods by allowing the dispatch decision to consider the dynamic types of several parameters rather than only the receiver. In practice, a multimethod is realized as a set of specialized methods, each defined for a particular combination of argument types, and a generic function or dispatcher that selects the most specific applicable method at call time.
Origins and languages: The concept originated in the object-oriented Lisp family, notably the Common Lisp Object
Dispatch mechanism: When a multimethod is invoked, the runtime examines the dynamic types of its argument(s)
Advantages and considerations: Multimethods can improve modularity, enabling new types and operations without modifying existing code,