Patterns can be grouped by using braces {}.

Grouping patterns together can extend the information assigned to a variable. For example,

x:{word word word}

The variable is assigned if the input consists of three strings. Without the braces, x is bound only to the value of the first word match.

Braces also can control how patterns are evaluated. The use of braces can be combined with operators:

{word integer}

The braces used in this example force the pattern to match a word followed by an integer or nothing at all. A single word or a single integer will not match this pattern.