I am just hacking around with Scheme (mit-scheme) and I have just figured out how you change the environment, so that '+' becomes a symbol for the equivalent procedure of the '-' operator.
Example
(environment-define user-initial-environment '+ -)
(eval (+ 3 2) user-initial-environment)
=> 1
I was just wondering if there were a simple way to deal with environments as variables so when I input an environment into eval, like so
(eval <exp> user-initial-environment)
I don't have to use 'user-initial-environment'. So I can 'play' with different environments for a function.
(eval <exp> env)
Where env is some predefined environment attached to my variable 'env'.