[plt-scheme] Evaluation in local environment?

From: Grant Rettke (grettke at acm.org)
Date: Tue Apr 1 08:31:17 EDT 2008

On Tue, Apr 1, 2008 at 12:57 AM, dsj22 <dsj22 at nau.edu> wrote:
>  Is there any way to achieve the same effect (passed a symbol, look up the
>  symbol and return the function it is attached to) but referring to the
>  environment created by a let function?

Not in R5RS Scheme.

>  I've also constructed an alternative solution, which was much more convoluted,
>  which uses a long cond statement, with a check for each (appended) method
>  name.

Why is this convoluted? This sounds like a pretty typical way to do
"message dispatch".

Once you have a solution working you can use macros to clean it up.

This approach is simple and easy to understand. You should give it a
try rather than pursuing eval and a special environment.


Posted on the users mailing list.