[Haskell-beginners] "Trinary" version of Either

Yitzchak Gale gale at sefer.org
Thu Jun 9 18:26:52 CEST 2011


Christopher Howard wrote:
>> Is there a Haskell package out there that provides a "trinary" version
>> of Either, i.e., allowing three values instead of two? I can see how
>> that would be very handy. Defining one obviously wouldn't be difficult,
>> but it would be helpful if someone else had already developed Monad
>> bindings and other related stuff.

Antoine Latter wrote:
> What would the Monad operations do?

It appears that the equivalents of Either (Either a b) c
and Either a (Either b c) could be equally useful.
So perhaps both should be provided inside newtype wrappers.

-Yitz



More information about the Beginners mailing list