Closed pbrisbin closed 7 years ago
Functor's examples, page 13.
class Functor Maybe where fmap = whenJust class Functor Maybe where fmap _ Nothing = Nothing fmap f (Just x) = Just (f x)
You're supposed to create instances of the typeclass Functor for Maybe:
Functor
Maybe
instance Functor Maybe where fmap = whenJust instance Functor Maybe where fmap _ Nothing = Nothing fmap f (Just x) = Just (f x)
Reported via email by Agustín Camino.
This appears to have been reported on an older version of the book. This was fixed in 3a6b98c00d78f93c8dde62f5ef2d3eb3968c9110, well before release.
Functor's examples, page 13.
You're supposed to create instances of the typeclass
Functor
forMaybe
:Reported via email by Agustín Camino.