28 Struct Printing
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/custom-write) | package: unstable-lib |
value
prop:auto-custom-write : (struct-type-property/c 'constructor)
When attached to a struct type, automatically generates a printer using
make-constructor-style-printer and attaches it to the struct type’s
prop:custom-write property. It also sets the
prop:custom-print-quotable property to 'never.
Examples:
> (struct point3 (x y z) #:property prop:auto-custom-write 'constructor) > (print (point3 3 4 5)) (point3 3 4 5)
> (write (point3 3 4 5)) #<point3: 3 4 5>