You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional patterns: sub-pattern that is enclosed in [ ] , it is considered optional. When that particular sub-pattern is not matched, it's skipped without rejecting the input.
Examples:
`(call append xs [0] 1 2)`
This pattern matches both append(xs, 0, 1, 2) and append(xs, 1, 2).
`(call f [(call g1) (call g2)])`
Optional part can contain arbitrary sub-patterns.
TODO: does `[a b]` pattern mean that b is only matched if a matched or
it's just a convenient syntax for `[a] [b]`?
Alternation: like A|B in regular expressions.
TODO: make decision on syntax.
Repetitions: like A+ and/or A{min,max} in regular expressions.
TODO: make decision on syntax.
Negative patterns: patterns that fail if they do match.
TODO: make decision on syntax.
Sub-pattern grouping: sub-patterns that are enclosed in { } can be treated as a single sub-pattern. This means that any modifiers or operations that are defined for single sub-pattern become possible for a list of sub-patterns.
TODO: examples.
The text was updated successfully, but these errors were encountered:
Optional patterns: sub-pattern that is enclosed in
[ ]
, it is considered optional. When that particular sub-pattern is not matched, it's skipped without rejecting the input.Examples:
Alternation: like
A|B
in regular expressions.TODO: make decision on syntax.
Repetitions: like
A+
and/orA{min,max}
in regular expressions.TODO: make decision on syntax.
Negative patterns: patterns that fail if they do match.
TODO: make decision on syntax.
Sub-pattern grouping: sub-patterns that are enclosed in
{ }
can be treated as a single sub-pattern. This means that any modifiers or operations that are defined for single sub-pattern become possible for a list of sub-patterns.TODO: examples.
The text was updated successfully, but these errors were encountered: