[plt-scheme] Recognising primitive procedures
Matthew Flatt
mflatt at cs.utah.edu
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
scheme_closed_prim_type.
That's the only idea I have so far, besides the hash-table technique
that you noted.
Matthew
More information about the plt-scheme
mailing list