Skip to content

Instantly share code, notes, and snippets.

@iurii-kyrylenko
Created February 9, 2019 15:59
Show Gist options
  • Save iurii-kyrylenko/96864e34eb6b2bb17618906c53b0f2ed to your computer and use it in GitHub Desktop.
Save iurii-kyrylenko/96864e34eb6b2bb17618906c53b0f2ed to your computer and use it in GitHub Desktop.
Kleisli Arrow -> fmap
-- Prelude Control.Monad> :t (>=>)
-- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
-- Prelude Control.Monad> :t (id >=>)
-- (id >=>) :: Monad m => (b -> m c) -> m b -> m c
-- Prelude Control.Monad> :t \f -> (>=> \x -> return (f x))
-- \f -> (>=> \x -> return (f x))
-- :: Monad m => (t -> c) -> (a -> m t) -> a -> m c
-- Prelude Control.Monad> :t \f -> id >=> \x -> return (f x)
-- \f -> id >=> \x -> return (f x)
-- :: Monad m => (t -> c) -> m t -> m c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment