
4 Mar
2018
4 Mar
'18
2:34 a.m.
I'm trying to implement my own Result type (and yes, I'm aware you can abuse Either for this :-) ) but doing something as (seemingly?) simple as implementing a Functor instance was surprisingly difficult.
Without knowing your final use case are Bifunctors what you are after (https://hackage.haskell.org/package/base-4.10.1.0/docs/Data-Bifunctor.html)? I used them when I wanted to fmap Left to convert errors to other errors. -Sumit