[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: finding procedure definitions
From: |
dsmich |
Subject: |
Re: finding procedure definitions |
Date: |
Fri, 29 Feb 2008 14:35:58 -0500 |
---- "Scott N. Walck" <address@hidden> wrote:
> Guile folks,
>
> Is there a way to ask for the definition of a procedure or to find the
> source code for a procedure?
Yes.
> For example, "symbol" is a guile procedure. I can see that by typing
> its name.
>
> guile> symbol
> #<procedure symbol args>
>
> But how can I find more information, such as its definition, including
> what types of arguments it expects and what it does and returns? I
> don't see symbol listed in the Guile Reference manual index. I'm not
> sure where to look in the source code.
$ guile
guile> symbol
#<procedure symbol args>
guile> (procedure-source symbol)
(lambda args (string->symbol (apply string args)))
guile>
This only works for Scheme, not for primitives written in C.
-Dale