You are looking at historical revision 11027 of this page. It may differ significantly from its current revision.

regular define-record records don't support generalized set. This macro implements support for binding to srfi-17.

(define-macro (define-gs-record type . fields)
  `(begin
    (define-record ,type ,@fields)
    ,@(map (lambda (f)
             (let* ((getter (string->symbol
                             (string-append
                              (symbol->string type)
                              "-"
                              (symbol->string f))))
                    (setter (string->symbol
                             (string-append
                              (symbol->string getter)
                              "-set!"))))
              (list 'define getter (list 'getter-with-setter getter setter))))
          fields)))
 

(define-gs-record test a b c)

now you can say

 (define t (make-test 1 2 3))
 (set! (test-a t) 'new-val)