chickadee » typed-records » define-record-type

(define-record-type NAME (CTOR FIELDNAME ...) PRED FIELD ...)syntax

Defines a SRFI-9 record type. FIELD may be any of

 (FIELDNAME GETTER)
 (FIELDNAME GETTER : TYPE)
 (FIELDNAME GETTER SETTER)
 (FIELDNAME GETTER SETTER : TYPE)

Declares:

(: CTOR (TYPE1 ... -> (struct NAME)))
(: PRED (* -> boolean : (struct NAME)))
(: GETTER ((struct NAME) -> TYPE))
(: SETTER ((struct NAME) TYPE -> undefined))

Specializations are added here as well.