fork download
  1. (define (gen-counter)
  2. (let ((c 0))
  3. (lambda () (set! c (+ c 1)) c)))
  4. (set! counter (gen-counter))
  5. (display (counter))
  6. (newline)
  7. (display (counter))
  8. (newline)
  9. (display (counter))
Success #stdin #stdout 0s 18080KB
stdin
Standard input is empty
stdout
1
2
3