unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: <dsmich@adelphia.net>
To: walck@lvc.edu
Cc: guile-user@gnu.org
Subject: Re: finding procedure definitions
Date: Fri, 29 Feb 2008 14:35:58 -0500	[thread overview]
Message-ID: <20303937.1204313758643.JavaMail.root@web40> (raw)

---- "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





             reply	other threads:[~2008-02-29 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 19:35 dsmich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-02-29 16:30 finding procedure definitions Scott N. Walck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20303937.1204313758643.JavaMail.root@web40 \
    --to=dsmich@adelphia.net \
    --cc=guile-user@gnu.org \
    --cc=walck@lvc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).