3 ms·
I'll also leave these here, in case the conversation inevitably turns to pattern-matched function definition in Elixir. :) https://github.com/clojure/core.matc
by tekacs 5y ago
I'll also leave these here, in case the conversation inevitably turns to pattern-matched function definition in Elixir. :)
https://github.com/clojure/core.match https://github.com/clojure/core.match -- pattern matching as a library
https://github.com/killme2008/defun https://github.com/killme2008/defun -- using core.match to implement Elixir/Erlang-like function definition
https://github.com/noprompt/meander 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-algorithm https://github.com/clojure/core.match/wiki/Understanding-the...
- jwhitlark 5y agoI've always loved that paper. Very readable, and gives good insights.
- SatvikBeri 5y agoIf videos are more your speed, David Nolen, the primary author of that library (and article) has a talk about it as well: https://www.youtube.com/watch?v=TVJa-V6U-XI https://www.youtube.com/watch?v=TVJa-V6U-XI