Skip to content

Instantly share code, notes, and snippets.

@jjant
Last active June 13, 2018 22:32
Show Gist options
  • Save jjant/86ab3b849b80305e284571b26f9598c8 to your computer and use it in GitHub Desktop.
Save jjant/86ab3b849b80305e284571b26f9598c8 to your computer and use it in GitHub Desktop.
myCont :: Cont r Int
myCont = Cont (\k -> k (10 + 30))
double :: Int -> Int
double x = x * 2
(runCont myCont) double -- 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment