This is a project I created while learning about Clojure. Multimethods seem pretty cool and I wanted implement them in JavaScript to learn more about them & understand them better, i.e. Just For Fun.
- register (attach) methods
- dispatch to methods
-
de-register (detach) methods[2018-05-23] -
default method[2018-05-23]
-
"derive" method ("is a" type hierarchy of dispatch types)[2018-06-19] -
resolve a child type to a parent type for function dispatch[2018-06-19]
- basic 2-item dispatch
- each item respects hierarchy
- get methods map
- get dispatcher
-
"handles" function to see if a call is handle-able (what to do if there's a default method?)[2018-06-19]
- Underive
- method to pass a dispatch hierarchy in/replace one (for sharing) (low priority)
- get dispatch hierarchy
- replace methods (hold on this 'til later; not currently clear it's a problem to just allow methods to be overwritten)