guile-devel
[Top][All Lists]
Advanced

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

Re: Anything better for delayed lexical evaluation than (lambda () ...)?


From: Marco Maggi
Subject: Re: Anything better for delayed lexical evaluation than (lambda () ...)?
Date: Tue, 06 Dec 2011 20:50:57 +0100

David Kastrup wrote:
> Hi, if I have something  read that is evaluated later, the
> lack  of procedure-environment in  Guilev2 implies  that I
> have  to wrap the  stuff in  (lambda ()  ...) in  order to
> capture the lexical environment for evaluation.

Sorry to step in without  an answer.  What are you trying to
do?  What I  understand is that a Scheme  program reads some
expressions and tries to evaluate them in a specific context
of the program.   Are you looking for a  way to do something
like the following chunk I found on the Net?

(define x 0)
(define clo 
  (let ((x 1)) 
    (lambda () '())))
(local-eval 'x (procedure-environment clo))
=> 1 

-- 
Marco Maggi



reply via email to

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