Next: iklib records defs mixins, Previous: iklib records defs descriptors, Up: iklib records defs [Index]
In a use of the syntax define-record-type, the definition
clause:
(strip-angular-parentheses)
causes angular parentheses to be stripped from the record–type name when automatically generating other syntactic identifiers related to the record–type. With a standard definition we get:
(define-record-type <alpha>) (<alpha>? (make-<alpha>)) ⇒ #t
and using strip-angular-parentheses:
(define-record-type <alpha> (strip-angular-parentheses)) (alpha? (make-alpha)) ⇒ #t
Similarly for field accessors and mutators, with a standard definitions:
(define-record-type <alpha>
(strip-angular-parentheses)
(fields (mutable a)
(mutable b)
(mutable c)))
(define O
(make-<alpha> 1 2 3))
(<alpha>-a-set! O 10)
(<alpha>-b-set! O 20)
(<alpha>-c-set! O 30)
(<alpha>-a O) ⇒ 10
(<alpha>-b O) ⇒ 20
(<alpha>-c O) ⇒ 30
and using strip-angular-parentheses:
(define-record-type <alpha>
(strip-angular-parentheses)
(fields (mutable a)
(mutable b)
(mutable c)))
(define O
(make-alpha 1 2 3))
(alpha-a-set! O 10)
(alpha-b-set! O 20)
(alpha-c-set! O 30)
(alpha-a O) ⇒ 10
(alpha-b O) ⇒ 20
(alpha-c O) ⇒ 30