boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

036-record-mutator.scm (258B)


      1 ; Mutators update the field in place; later accessor reads the new value.
      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 5 5))
      9 (set-point-y! p 33)
     10 (sys-exit (+ (point-x p) (point-y p)))