on master help sign in
Functor instance for IO.
694bf20startling
lib/Prelude.idr+3
@@ -70,6 +70,9 @@ instance Show a => Show (Maybe a) where
70
70
71---- Functor instances
71---- Functor instances
72
72
73+instance Functor IO where
74+ fmap f io = io_bind io (io_return . f)
75+
73instance Functor Maybe where
76instance Functor Maybe where
74 fmap f (Just x) = Just (f x)
77 fmap f (Just x) = Just (f x)
75 fmap f Nothing = Nothing
78 fmap f Nothing = Nothing