I need to read a text file using Common Lisp. File must be read to list of lists. Each list in the list must consist of a line from file. How to do this? I have done only this:
(let ((in (open "D:/Others/rgr.txt")))
  (format t "~a~%" (read-line in))
  (close in))
(with-open-file (in file)
  (loop for line = (read-line in nil nil)
        while line
        collect (coerce line 'list)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With