Matcha.Pattern (Matcha v0.1.3) View Source

About patterns.

Link to this section Summary

Link to this section Types

Specs

t() :: %Matcha.Pattern{source: Matcha.Source.pattern()}

Link to this section Functions

Link to this function

filter(pattern, enumerable)

View Source

Specs

filter(t(), Enumerable.t()) :: Enumerable.t()

Specs

match!(t(), term()) :: term() | no_return()

Specs

match?(t(), term()) :: boolean()
Link to this function

to_spec(context \\ :filter_map, pattern)

View Source

Specs

to_spec(context :: Matcha.Context.t(), t()) ::
  {:ok, Matcha.Spec.t()} | {:error, Matcha.Error.problems()}

Specs

validate(t()) :: {:ok, t()} | {:error, Matcha.Error.problems()}

Specs

validate!(t()) :: t() | no_return()