match val with { -- braces required
5 -> exactly the value `5`
x -> a single-arity value, bound to `x`
x when x > 0 -> a single-arity value satisfying the when expression
x: int -> a single-arity value, bound to `x` with type matching type pattern
(x, y) -> a two-arity value, bound to `x` and `y`
(5, y) -> a two-arity value, where the first is exactly 5 and the second is bound to `y`
_ -> wildcard, will match anything and bound nothing
}
A clarification of ideas from #19 and #20: