> Now Elixir has an equivalent to multi, the Protocol.
For what it's worth, Clojure also has a much closer fit to Elixir Protocols called... a Protocol.
https://www.braveclojure.com/multimethods-records-protocols/...
They too can only dispatch on the type of the first argument, but are more structured (you can add multiple pieces of behavior at a time) and performant than multimethods where that's the behavior you're looking for.
https://github.com/clojure/core.match -- pattern matching as a library
https://github.com/killme2008/defun -- using core.match to implement Elixir/Erlang-like function definition
https://github.com/noprompt/meander -- advanced pattern matching, for some fun and flavor :)
What's also fun is that core.match is implemented using a paper from INRIA on how to efficiently convert patterns into decision trees:
https://github.com/clojure/core.match/wiki/Understanding-the...