Skip to content

Instantly share code, notes, and snippets.

@Jazzatola
Created January 28, 2015 17:27
Show Gist options
  • Save Jazzatola/292d85d0fef8a213ad6f to your computer and use it in GitHub Desktop.
Save Jazzatola/292d85d0fef8a213ad6f to your computer and use it in GitHub Desktop.
Continuation Passing
object CPS {
def chainCps[A, B, R](f: ((A => R) => R), g: (A => ((B => R) => R))): (B => R) => R =
(h: B => R) => f(a => g(a)(h))
}
@tobyweston
Copy link

Yeah. Good luck with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment