Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.

Next: , Previous: , Up: R6RS Standard Libraries   [Contents][Index]


7.6.2.9 rnrs records syntactic

The (rnrs records syntactic (6)) library exports the syntactic API for working with R6RS records.

Scheme Syntax: define-record-type name-spec record-clause …

Defines a new record type, introducing bindings for a record-type descriptor, a record constructor descriptor, a constructor procedure, a record predicate, and accessor and mutator procedures for the new record type’s fields.

name-spec must either be an identifier or must take the form (record-name constructor-name predicate-name), where record-name, constructor-name, and predicate-name are all identifiers and specify the names to which, respectively, the record-type descriptor, constructor, and predicate procedures will be bound. If name-spec is only an identifier, it specifies the name to which the generated record-type descriptor will be bound.

Each record-clause must be one of the following:

Scheme Syntax: record-type-descriptor record-name

Evaluates to the record-type descriptor associated with the type specified by record-name.

Scheme Syntax: record-constructor-descriptor record-name

Evaluates to the record-constructor descriptor associated with the type specified by record-name.


Next: , Previous: , Up: R6RS Standard Libraries   [Contents][Index]