Christoph Angerer wrote:
(define (interpret prog)
(let [(myadd +) (mymul *)]
(eval prog)))
(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
environments: http://chicken.wiki.br/environments
Tobia
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users