Does setting the "current-namespace" parameter fix it for you?
#lang scheme/base

(define my-namespace (make-base-namespace))

(define (tree->proc tree symbol)
 (parameterize ((current-namespace my-namespace))
   (eval `(lambda (,symbol) ,tree))))

((tree->proc '(+ x (* 3 (* x x))) 'x) 42)
;; ==> 5334

Also, a comma was missing in the original example.

--
http://www.neilvandyke.org/
_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to