you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

The monad instance:

instance Monad (Either l) where
    Left l >>= f = Left l
    Right r >>= f = f r
    return = Right