ecl-logo Documentation

PatternUnion

PatternUnion[patterns]resultPattern

given a sequence of patterns, return a single pattern which matches all of them.

Details

    Input
    Output

Examples

Basic Examples  (3)

When multiple patterns are given as input, returns a pattern that checks for a match on all of them:

Returns the same pattern when only one pattern is given as input:

Does not resolve when no patterns are given as input: