(def make-counter1
  (bind count 0
    (fun () 
      (fun () 
        (begin (<- count (+ count 1))
               count)))))

(def make-counter2
  (fun () 
    (bind count 0
      (fun () 
        (begin (<- count (+ count 1))
               count)))))

(def make-counter3
  (fun () 
    (fun () 
      (bind count 0
        (begin (<- count (+ count 1))
               count)))))

(def test-counter
  (fun (make-counter)
    (bindseq ((a (make-counter))
              (b (make-counter)))
      (list (a) (b) (a)))))
