Either
right v
Section titled “right v”Construct a right value: { right = v; }.
left v
Section titled “left v”Construct a left value: { left = v; }.
mapR f either
Section titled “mapR f either”Apply f to the right branch; pass left unchanged.
mapL f either
Section titled “mapL f either”Apply f to the left branch; pass right unchanged.
chain f either
Section titled “chain f either”Monadic bind on right. f must return Either.
swap either
Section titled “swap either”Exchange right and left branches.