[plt-scheme] Recognising primitive procedures

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jan 4 12:25:50 EST 2008

At Wed,  2 Jan 2008 22:08:04 +0100, "Marco Maggi" wrote:
> I am using "scheme_make_closed_prim_w_arity()": I wonder if
> there is a way to recognise the primitive procedure's
> Scheme_Object
> as one that my library has created, when the procedure is used
> as argument of another primitive procedure.

Are there a small number of function pointers involved (that is, if you
create lots, it's because the data half of the closure changes)? If so,
you could check the function pointer when you see a value tagged as

That's the only idea I have so far, besides the hash-table technique
that you noted.


Posted on the users mailing list.