Created
October 4, 2015 11:49
-
-
Save susisu/2df0b28f6aeba03e92b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(define g '()) | |
(define (foo) | |
(define x 1) | |
(define (f) x) | |
(call/cc (lambda (cont) | |
(set! g cont) | |
)) | |
(print (f)) | |
(set! x (+ x 1)) | |
) | |
(foo) ; 1 | |
(print (g)) ; 2 | |
(print (g)) ; 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment