Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heath/5a9089aafb05e0390cfad4bcff8a91a6 to your computer and use it in GitHub Desktop.
Save heath/5a9089aafb05e0390cfad4bcff8a91a6 to your computer and use it in GitHub Desktop.
fmap :: ... => (a -> b) -> (f a -> f b)
(.) :: (y -> z) -> (x -> y) -> (x -> z)
fmap :: (f2 a -> f2 b) -> (f1 (f2 a) -> f1 (f2 b))
fmap :: (a -> b) -> (f2 a -> f2 b)
(.) :: (y -> z ) -> (x -> y ) -> (x -> z )
(.) :: ((f2 a -> f2 b) -> (f1 (f2 a) -> f1 (f2 b))) -> ((a -> b) -> (f2 a -> f2 b)) -> ((a -> b) -> (f1 (f2 a) -> f1 (f2 a)))
(.) fmap fmap :: (a -> b) -> (f1 (f2 a) -> f1 (f2 b))
^--- (.) fmap fmap = fmap . fmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment