5.3 define-datatype
(define-datatype datatypeid [variantid fieldid ...] ...) |
A short-hand for defining a group of related structures. A define-datatype form
(define-datatype datatypeid [variantid fieldid ...] ...)
is equivalent to
(define (datatypeid? x) (or (variantid? x) ...)) (define-struct variantid (fieldid ...)) ...