- (define-record-type-checked type-name (constructor arg-name ...) type-predicate? field ...)syntax
Defines a record type with checked constructor and field accessors/modifiers. type-name, constructor, and type-predicate? are the same as R7RS define-record-type's (note especially the constructor— checks are not allowed in it, only arg-name symbols!). Fields are either of the form (field-name field-predicate? accessor-name) or (field-name field-predicate? accessor-name modifier-name). These ensure that accessor and modifier return checked data and check new data respectively. It is an error if any of the checks are not successful.
define-record-type-checked also guarantees that initial values passed to constructor satisfy the predicates provided in field specification.