This is the mail archive of the mailing list for the guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Testing availabilty of a procedure

Ingo Hohmann <> wrote:
> I try to test wether a procedure is defined, and define
> it if it isn't:
In guile you can use:

(if (not (defined? 'a))
    (define (a) #t))

For my own modules I have, however, defined defined? to be a special
form at it is in scm, which I used before guile. Which is more "standard"?
I have tried to keep my scripts compatible with scm, but such an essential
thing as (defined? 'a) and (defined? a) make them highly incompatible.
(Ok I have not checked the latest scheme report about this...) forgive
me if it is already standardized!