[plt-scheme] Re: eval question
Hi all,
I have reviewed the recipe in the cookbook and I wanted to ask a
question. It states:
"And all this without the code you are evaluating having to include
require statements to load the modules it needs."
Including a require statements would be very beneficial in my case.
Following is the code segment that I came up with to implement this:
(require (lib "string.ss"))
(let ((my-string "(begin (require (lib \"utilities.ss\" \"srs\"))
(lambda () (yes-no-list)))"))
(let ((my-procedure (eval-string my-string)))
(printf "~a\n" (my-procedure))))
yes-no-list is a procedure defined in utilities.ss (in srs). Is this
correct or is there a better way to implement this.
Thanks,
Arend
Prabhakar Ragde wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Noel wrote:
>
>> Cookbook to the rescue!:
>>
>> http://schemecookbook.org/Cookbook/DynamicEvalCustomNamespace
>>
>> The recipe needs work -- feel free to complete it when you
>> have it working.
>
>
> Noel created this recipe for me, and I can attest that it is both tasty
> and nutritious. Talk about your complex carbohydrates, though. --PR
>
>