Next: iklib records defs hash, Previous: iklib records defs equality, Up: iklib records defs [Index]
In a use of the syntax define-record-type
, the definition
clause:
(comparison-procedure ?expr)
allows the specification of an expression ?expr which must evaluate to a custom comparison procedure protocol for instances of the record–type; iklib records comparison, for details on record’s comparison procedures.
If the record–type has a parent: the protocol function is applied to
the comparison procedure of the parent (or #f
if the parent has no
comparison procedure) and the resulting value must be a function, which
becomes the comparison procedure of the record–type.
If the record–type has no parent: the protocol function is called as a thunk and the resulting value must be a function, which becomes the comparison procedure of the record–type.