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

Understanding eval2 and local-eval


What is the difference between eval2 and local-eval?

I know I'm opening a can-o-worms. I know I should be patient and wait for the new environment thing.  I still want to know how this stuff works.

I found I can do things like:

(define env (let ((foo (lambda () (display "foo here\n")))
                  (bar (lambda () (display "bar!\n"))))
              (the-environment)))
(local-eval '(foo) env)
foo here
(local-eval '(bar) env)
bar!

How do you use eval2?

Is there a way to remove definitions from an environment?  The macro undefine only works at the top-level.

Thanks!
  -Dale

-- 
Dale P. Smith
Altus Technologies Corp.
dsmith@altustech.com
400-746-9000 x309

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