Created
May 1, 2013 15:26
-
-
Save TheTomster/5495966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro with-lines (line-sym path &rest body) | |
(let ((f-sym (gensym))) | |
`(with-open-file (,f-sym ,path) | |
(do ((,line-sym (read-line ,f-sym nil) | |
(read-line ,f-sym nil))) | |
((null ,line-sym)) | |
,@body)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment