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

data structures <--> functions

    Date: 2 Dec 87 19:14:11 GMT
    From: johnson at mimsy.umd.edu (Greg Johnson)

    I tried opening a file for writing, writing the object out, closing
    the file, opening it for reading, and reading the object in using
    various read primitives, but that didn't work.

Try something like

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

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