The
prop:print-converter property can be given a procedure
value for a structure type. In that case, for constructor-style print
conversion via
print-convert, instances of the structure are
converted by calling the procedure that is the property’s value. The
procedure is called with the value to convert and a procedure to
recursively convert nested values. The result should be an
S-expression for the converted value.
The print-converter? predicate recognizes instances of
structure types that have the prop:print-converter property,
and print-converter-proc extracts the property value.
The
prop:print-convert-constructor-name property can be given
a symbol value for a structure type. In that case, for
constructor-style print conversion via
print-convert,
instances of the structure are shown using the symbol as the
constructor name.
The prop:print-converter property takes precedence over
prop:print-convert-constructor-name. If neither is attached
to a structure type, its instances are converted using a constructor
name that is make- prefixed onto the result of
object-name.
The print-convert-named-constructor? predicate recognizes
instances of structure types that have the
prop:print-convert-constructor-name property, and
print-convert-constructor-name extracts the property value.