OCaml-like pattern-matching with vanilla JavaScript (no transpiler)
OCaml-like pattern-matching with vanilla JavaScript (no transpiler)
A few years back I wrote a little library that implements OCaml-inspired pattern matching using just plan JavaScript destructuring syntax. I don't think I ever shared it here. Thought you might find it interesting. I did this just for fun, don't use it in prod. It's very inefficient. Have a look at the source for a chuckle, it's a single 145 line file. Link: https://github.com/mrkev/fnMatch Playground: https://aykev.dev/fnMatch/
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Pattern matching in JavaScript without a transpiler
Motif – Scala-like pattern matching with Java 8
Efficient pattern matching for JavaScript
My first attempt at adding pattern matching to C#
VisualTail graphical tail with pattern matching
Matches.js -- Powerful Pattern Matching for Javascript
MarkovJunior, PPL based on pattern matching and constraint propagation
A gem for method overloading based on pattern matching for Ruby
Derive4j – Java8 support for ADTs, pattern matching, and more
Derive4j – Java8 support for ADTs, pattern matching, and more