sva39150.scm 371 B

12345678910111213141516171819
  1. (define-simple-class <Simple> (<Object>)
  2. (input type: <String> init-value: ""))
  3. (define (main)
  4. (define count 4)
  5. (let loop ()
  6. (set! count (- count 1))
  7. (if (< count 0)
  8. (exit 0))
  9. (format #t "count: ~d~%" count)
  10. (make <Simple> input: "value")
  11. (loop)))
  12. (main)
  13. ;; Output: count: 3
  14. ;; Output: count: 2
  15. ;; Output: count: 1
  16. ;; Output: count: 0