lambda-in-class-1.scm 227 B

1234567891011121314
  1. (module-export Bug)
  2. (define-class Bug ()
  3. (x ::int)
  4. ((f)
  5. (receive ((a ::int) (b ::int)) (values 1 2)
  6. (set! x b))))
  7. ((Bug):f)
  8. (define bug (Bug))
  9. (bug:f)
  10. (format #t "bug.x: ~d~%" bug:x)
  11. ;; Output: bug.x: 2