Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: rnrs records inspection, Previous: rnrs records syntactic, Up: R6RS Standard Libraries [Contents][Index]
The (rnrs records procedural (6))
library exports the procedural
API for working with R6RS records.
Returns a new record-type descriptor with the specified characteristics:
name must be a symbol giving the name of the new record type;
parent must be either #f
or a non-sealed record-type
descriptor for the returned record type to extend; uid must be
either #f
, indicating that the record type is generative, or
a symbol giving the type’s nongenerative uid; sealed? and
opaque? must be boolean values that specify the sealedness and
opaqueness of the record type; fields must be a vector of zero or
more field specifiers of the form (mutable name)
or
(immutable name)
, where name is a symbol giving a name for the
field.
If uid is not #f
, it must be a symbol
Returns #t
if obj is a record-type descriptor, #f
otherwise.
Returns a new record constructor descriptor that can be used to produce constructors for the record type specified by the record-type descriptor rtd and whose delegation and binding behavior are specified by the protocol procedure protocol.
parent-constructor-descriptor specifies a record constructor
descriptor for the parent type of rtd, if one exists. If
rtd represents a base type, then
parent-constructor-descriptor must be #f
. If rtd
is an extension of another type, parent-constructor-descriptor may
still be #f
, but protocol must also be #f
in this case.
Returns a record constructor procedure by invoking the protocol defined by the record-constructor descriptor rcd.
Returns the record predicate procedure for the record-type descriptor rtd.
Returns the record field accessor procedure for the kth field of the record-type descriptor rtd.
Returns the record field mutator procedure for the kth field of
the record-type descriptor rtd. An &assertion
condition
will be raised if this field is not mutable.
Next: rnrs records inspection, Previous: rnrs records syntactic, Up: R6RS Standard Libraries [Contents][Index]