Plaster
New
List
Login
common-lisp
default
anonymous
2024.03.15 11:03:34
(defmacro each-line (file-name &body body) "anaphor: line" (let ((stream-name (gensym))) `(with-open-file (,stream-name ,file-name) (loop for line = (read-line ,stream-name nil) while line ,@body)))) (each-line "/home/.../file.txt" do (print line) finally (return 'something))
Raw
Annotate
Repaste
Edit