3 ms·
I use this: (defun get-file (filename) (with-open-file (stream filename) (loop for line = (read-line stream nil) while line
by DickieStarshine 5y 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))))
- taeric 5y agoI'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)))