Next: srfi err5rs records spec synt, Previous: srfi err5rs records spec proc, Up: srfi err5rs records spec [Index]
The (srfi :99 records inspection)
library exports the following
procedures.
Equivalent to its R6RS namesake.
Equivalent to its R6RS namesake.
Equivalent to the record-type-name
procedure of the R6RS.
Equivalent to the record-type-parent
procedure of the R6RS.
Equivalent to the record-type-field-names
procedure of the
R6RS. (That is, it returns a vector of the symbols that name the
fields of the record–type represented by rtd, excluding the
fields of parent record–types.)
Return a vector of the symbols that name the fields of the record–type
represented by rtd, including the fields of its parent
record–types, if any. The fields of parent record–types come before
the fields of its children, with each subsequence in the same order as
in the vectors that would be returned by calling rtd-field-names
on rtd and on all its ancestral record–type descriptors.
Could be defined by:
(define (rtd-all-field-names rtd) (define (loop rtd othernames) (let ((parent (rtd-parent rtd)) (names (append (vector->list (rtd-field-names rtd)) othernames))) (if parent (loop parent names) (list->vector names)))) (loop rtd '()))
rtd is a record–type descriptor, and field is a symbol naming a
field of the record–type described by rtd. Return #t
if the
named field is mutable; otherwise returns #f
.