[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



          From: Tom Shultz, Dept. of Psychology, McGill Univ.
                ps33@mcgilla.bitnet

Subject:      data structures <--> functions
Comments: To: Jonathan A Rees <JAR@mc.lcs.mit.edu>
Comments: cc: scheme@mc.lcs.mit.edu
In-Reply-To:  <Msg of 3 Dec 87 17:12>

>>>Try something like

>>>    (define evaluate
>>>      (lambda (expression)
>>>       (call-with-output-file "temp"
>>>          (lambda (port)
>>>       (write `(define temp ,expression) port)))
>>>    (load "temp")
>>>    temp))

>>>if you can manage to do so without making yourself ill.

One of the problems with this approach is that both "load"
and "eval" are supposed to be avoided by MacScheme users
wanting to take advantage of selective linking. Another problem
is the slowness of accessing an external file.

There really should be a better solution for this general problem
of having a program build a data structure and then execute it as
a function.

Any ideas?