define-record-type

[syntax] define-record-type typename (constructor tag ...) predicate field ...

where:

  field : (field-tag accessor-name)
            | (field-tag accessor-name modifier-name)

SRFI-9, Scheme48:

[syntax] define-record-type type (constructor tag ...) predicate field ...

SRFI-57: Extends srfi-9 in the following ways:

  • Allows inheritance, using schemes (see define-record-scheme?). Thus type can be either just a symbol, or a list like (type-name scheme-name ...) when type-name inherits from scheme-name ....
  • The type name becomes a macro that works as a constructor with labeled field initializer arguments.
  • Most syntax arguments can be omitted or given #f if unnecessary.

notes

ChezScheme has define-record, which implicitly creates constructors, predicates, and field accessor/mutators.

Scheme48 also defines a bunch of low-level procedures for records and record types. See make-record, record, record?, record-length, record-type, record-ref, record-set!, make-record-type, record-type?, record-type-name, record-type-field-names, record-constructor, record-predicate, record-accessor, record-modifier, define-record-discloser, define-record-resumer.

SLIB provides low-level record API which is similar to Scheme48's. See make-record-type.