You are looking at historical revision 27625 of this page. It may differ significantly from its current revision.
define-record-and-printer[syntax] (define-record-and-printer name slotname) → record
Define a record and a printer that shows the contents of the record as a vector; see define-record.
- The name of the record
- The name of the slot
(define-syntax define-record-and-printer (lambda (expression rename compare) (match expression ((_ record . fields) (let ((%define-record (rename 'define-record)) (%define-record-printer (rename 'define-record-printer)) (%begin (rename 'begin)) (%lambda (rename 'lambda)) (%write (rename 'write)) (%record->vector (rename 'record->vector))) `(,%begin (,%define-record ,record ,@fields) (,%define-record-printer ,record (,%lambda (record out) (,%write (,%record->vector record) out)))))))))
About this egg
Documented by cock.