* finding procedure definitions
@ 2008-02-29 16:30 Scott N. Walck
0 siblings, 0 replies; 2+ messages in thread
From: Scott N. Walck @ 2008-02-29 16:30 UTC (permalink / raw)
To: guile-user
Guile folks,
Is there a way to ask for the definition of a procedure or to find the
source code for a procedure?
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.
Thanks,
Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: finding procedure definitions
@ 2008-02-29 19:35 dsmich
0 siblings, 0 replies; 2+ messages in thread
From: dsmich @ 2008-02-29 19:35 UTC (permalink / raw)
To: walck; +Cc: guile-user
---- "Scott N. Walck" <walck@lvc.edu> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-29 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29 16:30 finding procedure definitions Scott N. Walck
-- strict thread matches above, loose matches on Subject: below --
2008-02-29 19:35 dsmich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).