Matcha (Matcha v0.1.0) View Source
First-class match specification and match patterns for Elixir.
The BEAM VM Match patterns and specs
Link to this section Summary
Link to this section Functions
Macro for building a Matcha.Pattern.
The context may be nil, :table, :trace, or a Matcha.Context module.
Examples
iex> require Matcha ...> Matcha.pattern({x, y}) #Matcha.Pattern<{:"$1", :"$2"}>
Macro for building a Matcha.Spec.
The context may be nil, :table, :trace, or a Matcha.Context module.
Examples
iex> require Matcha ...> Matcha.spec do ...> {x, y, x} -> {y, x} ...> end #Matcha.Spec<[{{:"$1", :"$2", :"$1"}, [], [{{:"$2", :"$1"}}]}]>