3 ms·
In erlang's pattern matching syntax, arguments given at run time are matched successively against number and types of formal parameters in each ";" separated cl
by gtani 16y ago
In erlang's pattern matching syntax, arguments given at run time are matched successively against number and types of formal parameters in each ";" separated clause in a function definition (plus against any guard's specified values).
This is similar to the syntax in haskell, F# and ocaml, so it may look weird at the outset but it's not an isolated weirdness, and it quickly becomes a natural way to read code.