[plt-scheme] datatype detection?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Oct 29 10:42:26 EST 2002

At Tue, 29 Oct 2002 15:45:11 +0100, Rohan Nicholls wrote:
> Since every struct produces a test for itself, ie from htdp
> (define-struct plane (...))
> (define jet (make-plane ...))
> (plane? jet) -> #t
> so the structure carries around with it what datatype it is, so is there 
> a function that can look at this information and return it?

`struct-info', if you have a sufficiently senior inspector.

See section 4.6 in the MzScheme manual for details.


Posted on the users mailing list.