transform

fnEither transform(Pattern pattern)

Expands a pattern into an (almost) equivalent one with a single Either at top.

Example: ((-a | -b) (-c | -d)) => (-a -c | -a -d | -b -c | -b -d)

Parameters

patternThe pattern to transform.

Returns

An Either pattern containing all expanded alternatives.