Permalink
Switch branches/tags
Nothing to show
Find file Copy path
01bab18 Oct 6, 2015
1 contributor

Users who have contributed to this file

19 lines (16 sloc) 270 Bytes
(define (make-f)
(let ((seed 2))
(lambda (x)
(set! seed (- seed 1))
(* x seed))))
(define f (make-f))
; left -> right
(define f0 (f 0))
(define f1 (f 1))
(+ f0 f1)
;Value: 0
(define f (make-f))
(define f1 (f 1))
(define f0 (f 0))
(+ f0 f1)
;Value: 1