[Top][All Lists]

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

Re: defined?

From: Mikael Djurfeldt
Subject: Re: defined?
Date: Mon, 13 Jan 2003 12:42:08 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Egil Moeller <address@hidden> writes:

> Yes, and I had allrready found that. I even wrote that in the original
> mesage.

Ah.  Sorry.

> But there seems to be no wayd of getting an environment for the
> current closure.

Aha.  There's a reason why these things aren't well documented.  That
is because it isn't finally decided whether we'll continue to support
those features.  Currently you can do:

  (let ((a 1)) (defined? 'a (the-environment))) => #t

> interaction-environment does not do the tric, and the return-value
> of (procedure-environment (lambda () 'foo)) does not help neither
> (it is of the wrong type!)...

It is not of the wrong type.  Consider:

guile> (define foo (let ((a 1)) (lambda () 'foo)))
guile> (define e (procedure-environment foo))
guile> (defined? 'a e)
guile> (local-eval 'a e)

Best regards,

reply via email to

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