- (record-vector-update! R-V #:NAME VALUE)procedure
- (rv-update! R-V #:NAME [#:SUB-NAME ...] VALUE)syntax
These procedure and macro (which recursive variant) for update existing attribute values and add new attribute in record-vector R-V.
> (define p (make-rv posn: (make-rv x: 1 y: 2))) > (rv-update! p posn: x: 10) > p => (((#:posn . 0)) . #((((#:x . 0) (#:y . 1)) . #(10 2)))) > (rv-update! p posn: z: 30) > p => (((#:posn . 0)) . #((((#:x . 0) (#:y . 1) (#:z . 2)) . #(10 2 30)))) ;; rv-update! is stable > (rv-update! p posn: z: 30) > p => (((#:posn . 0)) . #((((#:x . 0) (#:y . 1) (#:z . 2)) . #(10 2 30))))