[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Evaluating lists with scoped let's and applying scop
Re: [Chicken-users] Evaluating lists with scoped let's and applying scoped macros to lists
Fri, 13 Feb 2009 12:40:12 +0100
Christoph Angerer wrote:
(define (interpret prog)
(let [(myadd +) (mymul *)]
(display (interpret '(myadd 4 (mymul 5 2))))
This cannot possibly work.
The symbol myadd is lexically scoped to the let block. The invocation
of interpret is *outside* the let block. Period.
What you are looking for is an enhanced version of (eval) that can
accept a user-defined environment. You will find it in unit