[plt-scheme] datatype detection?

From: Rohan Nicholls (rohan.nicholls at informaat.nl)
Date: Tue Oct 29 09:45:11 EST 2002

I have been looking through the documentation, and made searches on the 
help desk, to see if there is a function that will detect what type of 
data something is, so the reverse of string?, struct? etc.

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?

Tia,

rohan



Posted on the users mailing list.