defclass2.scm 252 B

123456789
  1. ;; Kawa-options: "-f" %F
  2. (define-class foo () (x1) (x2))
  3. (define-class bar () (y1) (y2))
  4. (define-class foobar (foo bar) (z1) (z2))
  5. (define-constant fb (foobar x2: 22 y1: 31 z2: 49))
  6. (format #t "fb x2:~a z2:~a~%" fb:x2 fb:z2)
  7. ;; Output: fb x2:22 z2:49