Next: , Up: iklib records   [Index]


6.19.1 Extensions to record type definitions

Syntax: define-record-type ?name-spec ?record-clause
Auxiliary Syntax: fields ?field-spec
Auxiliary Syntax: method
Auxiliary Syntax: virtual-method
Auxiliary Syntax: super-protocol ?expr
Auxiliary Syntax: destructor-protocol ?expr
Auxiliary Syntax: constructor-signature ?signature
Auxiliary Syntax: type-predicate ?expr
Auxiliary Syntax: custom-printer ?expr
Auxiliary Syntax: equality-predicate ?expr
Auxiliary Syntax: comparison-procedure ?expr
Auxiliary Syntax: hash-function ?expr
Auxiliary Syntax: define-type-descriptors
Auxiliary Syntax: strip-angular-parentheses
Auxiliary Syntax: mixins ?mixin-name
Auxiliary Syntax: implements ?interface-name

Defined by R6RS. Define a new R6RS record type; define-record-type. This syntax supports some Vicare extensions.

When the selected language is non–strict R6RS: multiple fields clauses are accepted and the field specifications concatenated in the order in which they are given. Example:

(define-record-type alpha
  (fields a)
  (fields b)
  (fields c))

(define O
  (make-alpha 1 2 3))

(alpha-a O)     ⇒ 1
(alpha-b O)     ⇒ 2
(alpha-c O)     ⇒ 3

Next: , Up: iklib records   [Index]