Skip to content

Instantly share code, notes, and snippets.

@fcracker79
Created April 14, 2021 12:20
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 fcracker79/f162b47dbf4c2aa8139a1e621bf84903 to your computer and use it in GitHub Desktop.
Save fcracker79/f162b47dbf4c2aa8139a1e621bf84903 to your computer and use it in GitHub Desktop.
newtype MyCont r a = MyCont ((a -> r) -> r)
mycont :: MyCont r a -> (a -> r) -> r
mycont (MyCont f) = f
instance Functor (MyCont r) where
fmap f (MyCont ma) = undefined
instance Applicative (MyCont r) where
pure a = undefined
(MyCont mf) <*> (MyCont ma) = undefined
instance Monad (MyCont r) where
MyCont ma >>= f = undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment