Hi, I'm ChrisH. Am a neophyte in lisp. Am trying to figure out how to take
data from a file, and store it in a list. Can someone offer some simple,
proven experience?
TIA,
ChrisH
(defun read-data-from-file (filename)
;; Reads data from file "filename" using the Lisp reader and
;; returns the values as a list.
(let ((eof (gensym)))
(with-open-file (f filename :direction :input)
(loop for datum = (read f nil eof)
until (eq datum eof)
collect datum))))
-Tom Russ