[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect a procedure

From: bitwize
Subject: Re: How to detect a procedure
Date: Mon, 29 Apr 2002 06:52:28 +0200 (CEST)

On Sun, 28 Apr 2002, Bruce Korb wrote:

> OK.  If:
>   (if (procedure? 'mumble) (mumble))
> doesn't work, what does?  I keep trying different things
> to no avail.  This is very, very frustrating.

First of all, this type of thing is better off posted to guile-user 
instead of guile-devel (where nitty-gritty implementation details are 
mainly discussed).

Secondly, the answer to your query is, procedures are stored in the same 
namespace as ordinary variables; (procedure? mumble) returns #t if mumble 
names a prevoiusly defined procedure. There is no need to quote, e.g. 
'mumble, or to use the Common LISP convention #'mumble.

Note that this applies to primitives, too; (procedure? procedure?) returns 
#t. :)

Jeffrey T. Read

reply via email to

[Prev in Thread] Current Thread [Next in Thread]