top | item 29515116

(no title)

DickieStarshine | 4 years ago

I use this:

    (defun get-file (filename)

      (with-open-file (stream filename)

        (loop for line = (read-line stream nil)

              while line

              collect (parse-integer line))))

discuss

order

taeric|4 years ago

I've so far had good mileage with basically the following:

    (with-input-from-string (stream "1,2,3")
           (let ((*readtable* (copy-readtable)))
             (set-syntax-from-char #\, #\  )
             (loop for num = (read stream nil nil)
                   while num
                   collect num)))