Skip to content

Instantly share code, notes, and snippets.

@Lysxia
Last active November 21, 2018 03:41
Show Gist options
  • Save Lysxia/570f167af776dada808181c7f1bdd6d4 to your computer and use it in GitHub Desktop.
Save Lysxia/570f167af776dada808181c7f1bdd6d4 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