[plt-scheme] Executing code created on the fly

From: Ihe (wookiz at hotmail.com)
Date: Sat Jul 26 17:06:02 EDT 2008

I tried doing this with eval  and ran into problems. I am also having
problems using macros or syntax rules e.g

(define-syntax make-program
  (syntax-rules ()
    [(make-program expr) (lambda (x y) expr)]))

I want to be able to say
(let ((prog-body blah))
    (make-program prog-body))

and have a different procedure returned depending on the value prog-
body is set to.

Alas this does not work.

Basically I want to be able to execute these programs created on the
fly and to be able to capture the source of each program ... I don't
really care how it is done (except not with eval due to problems
already experienced).


Posted on the users mailing list.