Created
January 28, 2015 17:27
-
-
Save Jazzatola/292d85d0fef8a213ad6f to your computer and use it in GitHub Desktop.
Continuation Passing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah. Good luck with that.