Created
June 19, 2012 19:04
-
-
Save takikawa/2955928 to your computer and use it in GitHub Desktop.
expansion of reset0/shift0
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
#lang racket | |
(define pt (make-continuation-prompt-tag)) | |
(call-with-continuation-prompt | |
(lambda () | |
(+ 1 | |
(call-with-composable-continuation | |
(lambda (k) | |
(abort-current-continuation | |
pt | |
(lambda () | |
((lambda (k) k) | |
(lambda vals | |
(call-with-continuation-prompt | |
(lambda () | |
(apply k vals)) | |
pt | |
(lambda (thunk) (thunk))))))))))) | |
pt | |
(lambda (thunk) (thunk))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment