Skip to content

Instantly share code, notes, and snippets.

@tail-call
Created March 2, 2016 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tail-call/5ded2f2c079e60721469 to your computer and use it in GitHub Desktop.
Save tail-call/5ded2f2c079e60721469 to your computer and use it in GitHub Desktop.
Scheme curried
(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