Append a value from the left monoid
Append a value from the right monoid
Project out both monoids individually
A homomorphism to a monoid Z (if f and g are homomorphisms).
Project out the value in the left monoid
Prepend a value from the left monoid
Prepend a value from the right monoid
Project out the value in the right monoid
Take a value from the coproduct monoid where each monoid acts on the other, and untangle into a pair of values.
Take a value from the coproduct monoid where each monoid acts on the
other, and untangle into a pair of values. Before being folded into the answer
an N value is combined with the sum of the M values to its left via g and
an M value is combined with the sum of the N values to its left via f.
This allows you to add up N values while having the opportunity to "track"
an evolving M value, and vice versa.
Like untangle, except M values are simply combined without regard to the
N values to the left of it.
Like untangle, except N values are simply combined without regard to the
N values to the left of it.
The associative operation of the monoid coproduct
The coproduct (or free product) of monoids
MandN. Conceptually this is an alternating list ofMandNvalues, with the identity as the empty list, and composition as list concatenation that combines adjacent elements when possible.