manpagez: man pages & more
info guile
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6.2.10 rnrs records procedural

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

Scheme Procedure: make-record-type-descriptor name parent uid sealed? opaque? fields

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

Scheme Procedure: record-type-descriptor? obj

Returns #t if obj is a record-type descriptor, #f otherwise.

Scheme Procedure: make-record-constructor-descriptor rtd parent-constructor-descriptor protocol

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.

Scheme Procedure: record-constructor rcd

Returns a record constructor procedure by invoking the protocol defined by the record-constructor descriptor rcd.

Scheme Procedure: record-predicate rtd

Returns the record predicate procedure for the record-type descriptor rtd.

Scheme Procedure: record-accessor rtd k

Returns the record field accessor procedure for the kth field of the record-type descriptor rtd.

Scheme Procedure: record-mutator rtd k

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.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 20, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.