nesting-1.scm 355 B

12345678910
  1. (define (make-named-array name)
  2. (object (java.util.ArrayList)
  3. ((*init*)
  4. (invoke-special <java.util.ArrayList> (this) '*init* 100))
  5. ((toString)
  6. (format #f "ArrayList/~a" name))))
  7. (define al (make-named-array "blue"))
  8. (format #t "make-naked-array: ~a~%" (al:toString))
  9. ;; Output: make-naked-array: ArrayList/blue