Fold
You can fold over unions and sequences with five different (prefix) fold operators:
\+
: sum\*
: product\&
: all\;
: catenate\|
: or
These operators allow you to calculate sums and products, and to turn unions into sequences or vice versa.
S1:
S2:
C1:
C2: