Closed CodaFi closed 9 years ago
struct MonoidCoproduct<A : Monoid, B : Monoid> : Monoid { let stuff : [Either<A, B>] }
(Also, think of a better name for this thing).
This should actually be [(A, B)] on the inside, because of monoidal collapse.
[(A, B)]
Strictly alternating pre-products get tricky with strict languages.
(Also, think of a better name for this thing).