Skip to content

Instantly share code, notes, and snippets.

@xvaldetaro
Last active February 17, 2022 17:35
Show Gist options
  • Save xvaldetaro/302b991b278ac621376cf27d00e293f6 to your computer and use it in GitHub Desktop.
Save xvaldetaro/302b991b278ac621376cf27d00e293f6 to your computer and use it in GitHub Desktop.
Summary.purs
class Functor f where
map :: forall a b. (a -> b) -> f a -> f b
class (Functor f) <= Apply f where
apply :: ∀ a b. f (a -> b) -> f a -> f b
class (Apply m) <= Bind m where
bind :: ∀ a b. m a -> (a -> m b) -> m b
class (Applicative m, Bind m) <= Monad m
class (Apply f) <= Applicative f where
pure :: ∀ a. a -> f a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment