(define (make-counter)
  (let ((var 0))
    (lambda ()
      (mutate var (+ 1 var))
      var)))

(define counter1 (make-counter))
(assert (= (counter1) 1))

(define counter2 (make-counter))
(assert (= (counter2) 1))

(assert (= (counter2) 2))
(assert (= (counter1) 2))
(assert (= (counter1) 3))
(assert (= (counter2) 3))
