Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!ucbvax!MCGILLA.BITNET!PS33
From: PS33@MCGILLA.BITNET
Newsgroups: comp.lang.scheme
Subject: (none)
Message-ID: <8712042258.AA24920@ucbvax.Berkeley.EDU>
Date: Fri, 4-Dec-87 17:59:35 EST
Article-I.D.: ucbvax.8712042258.AA24920
Posted: Fri Dec  4 17:59:35 1987
Date-Received: Thu, 10-Dec-87 04:33:25 EST
Sender: usenet@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 31


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

Subject:      data structures <--> functions
Comments: To: Jonathan A Rees 
Comments: cc: scheme@mc.lcs.mit.edu
In-Reply-To:  

>>>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?