There is a code implementing 'cat' command with Lists, as shown in the book, page 122.
(defun pseudo-cat (file) (with-file-file (str file: direction: input) ((((line (reading-line str 'zero) (reading-line str' zero) (Eql line 'eof)) (format t "~ a ~%" line))))
Why does the reading-line function run twice? I only used it with a reading line Tried to run but could not end the Lisp code.
The syntax of the DO variable is: variable , Initial form, update form. In this case, initial Rann same form Update form. But there is no rhythm of the case DO, you'll need to write it twice.
Comments
Post a Comment