You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps I'm misunderstanding Monadic laws or the like, but I've hit a situation where it would be useful to bimap over an Exception or Maybe monad without necessarily knowing which type it is, and it seems only Either implements the Bifunctor protocol. Is this for Category Theory reasons or simply an omission?
The text was updated successfully, but these errors were encountered:
I wasn't able to find any good resources online quickly, but as I understand it, a Bifunctor instance for Exception or Maybe doesn't make sense, because unlike Either or Pair, there's no "left" value to map over.
Nothing represents the absence of a value and Exception represents an error, thus not a desirable value. Therefore it doesn't make sense to want to map over them.
Perhaps I'm misunderstanding Monadic laws or the like, but I've hit a situation where it would be useful to
bimap
over an Exception or Maybe monad without necessarily knowing which type it is, and it seems only Either implements the Bifunctor protocol. Is this for Category Theory reasons or simply an omission?The text was updated successfully, but these errors were encountered: