* Eval with local environment?
@ 2017-08-19 21:14 Christopher Howard
2017-08-19 21:36 ` David Kastrup
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Howard @ 2017-08-19 21:14 UTC (permalink / raw)
To: Guile User Mailing List
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
I was just curious: Is there something you can pass to eval procedure
that using the local environment? e.g.,
(let ((foo 12)) (eval 'foo (this-environment)))
to get it to return 12. Of course, you could just
(let ((foo 12)) foo)
But suppose you were working with the identifier 'foo instead for some
reason. All I saw in docs was interaction-environment and null-
environment.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Eval with local environment?
2017-08-19 21:14 Eval with local environment? Christopher Howard
@ 2017-08-19 21:36 ` David Kastrup
0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2017-08-19 21:36 UTC (permalink / raw)
To: guile-user
Christopher Howard <christopher.howard@qlfiles.net> writes:
> I was just curious: Is there something you can pass to eval procedure
> that using the local environment? e.g.,
>
> (let ((foo 12)) (eval 'foo (this-environment)))
>
> to get it to return 12.
No. But there is
(use-modules (ice-9 local-eval))
(let ((foo 12)) (local-eval 'foo (the-environment)))
--
David Kastrup
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-19 21:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-19 21:14 Eval with local environment? Christopher Howard
2017-08-19 21:36 ` David Kastrup
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).