[plt-scheme] introspection

From: Ethan Herdrick (info at reatlas.com)
Date: Tue Oct 23 04:35:49 EDT 2007

Part of what you're looking for is the procedure-arity function:

>> (procedure-arity cons)
2

I know what you mean.  PLT Scheme really is pretty wonderful, isn't it?

-Ethan



On 10/22/07, Rohan Nicholls <rohan.nicholls at googlemail.com> wrote:
> Hello all,
>
> I have been trying to figure out how I can find out what the
> properties of an element  are within a live environment.
> e.g. I am looking at a function - what are its calling protocol is
> etc.
> Also useful would be a reference to where the source can be found, but
> it is likely that is not stored in the running image.  I am thinking
> of something like find-function in emacs.
>
> I have searched in the manuals and the help desk, but cannot find
> anything, although maybe I am looking for the wrong things.
>
> On a related note, I know that there are no docstrings in plt scheme
> such as you find in lisp and python, but in htdp and other plt related
> material there seems to be a a convention that goes something like
> this:
>
> ;; name-of-func : calling protocol -> return value
> ;; description of functionality etc.
> (define name-of-func ....
>
> Is this information actually processed in some way making it
> accessible to querying from the image? I guess I can hack something
> together if the find-function equivalent exists.
>
> Thanks in advance, and really enjoying all the new (for me) features
> you have added to the language.
>
> Rohan
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.