Created
March 2, 2016 12:47
-
-
Save tail-call/5ded2f2c079e60721469 to your computer and use it in GitHub Desktop.
Scheme curried
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
(define ((make-counter i)) | |
(set! i (+ i 1)) | |
i) | |
(define a (make-counter 0)) | |
(dotimes (_ 8) ; Imagine there is dotimes in Scheme. | |
; I mean, like if it was impossible to have it... | |
(print (a))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment