[plt-scheme] (typeof obj)

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Mon Jun 11 09:27:03 EDT 2007

I assume you mean 'procedure (-:.

So you don't really want the type at all: you just want the run-time
tag on a value.  (That's what *you* want -- is that what the OP
wants?)  I don't find that very useful.  What you want you can write
just as well in Scheme:

(define (run-time-tag-of v)
  (cond
    [(number? v) 'number]
    [(string? v) 'string]
    ...
    [(procedure? v) 'procedure]))

Fill in the ... lines (about ten of them), and make a SRFI -- done!

Shriram

PS: I can guess the counter-argument you will give.  I have my
    counter-counter-argment ready. <-;


Posted on the users mailing list.