I have a few questions about custom types in Gambit. I apologize if they seem elementary, but I couldn't find an answer in the docs or the mailing list archives, and I'm new to Scheme.<br><br>I've defined a new type "my-type" using define-type. How can I control how an instance of my-type gets displayed in the REPL? I know I can declare individual slots of my-type to be unprintable:, but I'd like to just be able to define a "print-my-type" function that gets called.<br>

<br>Similarly, how can I define a custom constructor that does something more complicated than assign arguments to slots? <br><br>Finally, there seem to be four options for defining structs in Gambit: define-structure, define-type, srfi-9's define-record-type, and meroon. Which should I be using? At the moment, I'm only defining very basic structures (e.g. doubly-linked lists), but my ambitions will probably grow.<br>

<br>Best,<br>-- Matt<br><br>