035-record-basic.scm (218B)
1 ; define-record-type with constructor and accessors. 2 (define-record-type point 3 (make-point x y) 4 point? 5 (x point-x) 6 (y point-y set-point-y!)) 7 8 (define p (make-point 7 11)) 9 (sys-exit (+ (point-x p) (point-y p)))