A multimethod chooses an implementation with a dispatch function you write. That is open polymorphism without a type hierarchy, which is the practical counterpart of reaching for generics when the distinction is in the data. |
|
|
|
New shapes can be added later with another |
|
Next example: Atoms.