3 ms·
https://erlang.org/doc/reference_manual/expressions.html#pattern https://erlang.org/doc/reference_manual/expressions.html#pat... it's more like the = sign in m
by weatherlight 5y ago
https://erlang.org/doc/reference_manual/expressions.html#pattern https://erlang.org/doc/reference_manual/expressions.html#pat...
it's more like the = sign in math mathematics.
2x = 10
we can deduce x = 5
Here's an elixir example where a bunch of "if/else" blocks are refactored to use case statements, and then from case statements to pattern matching.
https://nickjanetakis.com/blog/refactoring-elixir-code-if-cond-and-pattern-matching https://nickjanetakis.com/blog/refactoring-elixir-code-if-co...