Next: , Previous: , Up: iklib records   [Index]


6.19.2 Record predicates

Function: record-and-rtd? record rtd

Return #t if record is a record instance of the type described by rtd or a record instance of a subtype of rtd; otherwise return #f. This procedure does not care if rtd is an opaque record type.

Syntax: record-type-and-record? ?type-name ?record

Return #t if ?record is an expression evaluating to a record instance of type ?type-name or a record instance of a subtype of ?type-name; otherwise return #f. This syntax does not care if ?type-name is an opaque record type.

This syntax allows to test the type of a record instance through the type name identifier, without the need to export the predicate identifier out of libraries. It performs the same operation of the more generic is-a?, but will raise an exception if ?type-name is not the identifier of a record type.