Skip to content

Instantly share code, notes, and snippets.

@thedeemon
Created November 6, 2015 04:12
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 thedeemon/ddf63573f089dff61aae to your computer and use it in GitHub Desktop.
Save thedeemon/ddf63573f089dff61aae to your computer and use it in GitHub Desktop.
newtype Qeust b a = Qeust ((a -> b) -> a)
instance Functor (Qeust b) where
fmap f (Qeust aba) = Qeust (\ cb -> f (aba (\a -> cb (f a) ) ))
-- aba :: ((a -> b) -> a)
-- f :: a -> c
-- res :: Qeust b c
-- cb :: c -> b
-- f a :: c
-- cb (f a) :: b
-- (\a -> cb (f a)) :: \a -> b
-- aba ^ :: a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment