7.7
27 Structs
NOTE: This library is deprecated; use racket/struct , instead. The contents of this module, with the exceptions below, have been merged with racket/struct.
(require unstable/struct) | package: unstable-lib |
syntax
(make struct-id expr ...)
Creates an instance of struct-id, which must be bound as a
struct name. The number of exprs is statically checked
against the number of fields associated with struct-id. If
they are different, or if the number of fields is not known, an error
is raised at compile time.
Examples:
> (define-struct triple (a b c)) > (make triple 3 4 5) #<triple>
> (make triple 2 4) eval:4:0: make: wrong number of arguments for struct triple
(expected 3, got 2)
in: (make triple 2 4)