on master help sign in
Functor instance for (Either e).
894a847startling
lib/Prelude.idr+4
@@ -106,6 +106,10 @@ instance Functor Maybe where
106 fmap f (Just x) = Just (f x)
106 fmap f (Just x) = Just (f x)
107 fmap f Nothing = Nothing
107 fmap f Nothing = Nothing
108
108
109+instance Functor (Either e) where
110+ fmap f (Left l) = Left l
111+ fmap f (Right r) = Right (f r)
112+
109instance Functor List where
113instance Functor List where
110 fmap = map
114 fmap = map
111
115