This is the mail archive of the guile@cygnus.com 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]

local eval


Hi,

this

  (define (new-environment environment-id)
    ((procedure->syntax (lambda (exp env) env))))

defines a new environment that can be used to do some local
evaluations.  In order to prevent the locally evaluated code to
destroy the global environment, one has to protect all definitions by
duplicating them in the local environment via:

  (local-eval '(define set! set!) env)

Is it possible to duplicate all definitions at once?

-- 
The second clause "open source code of derivative works" has been the
most controversial (and, potentially the most successful) aspect of
CopyLeft licensing.                             -- Halloween Document