Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun count-prefix-spaces-in-lines (pathname)
- (with-open-file (stream pathname)
- (loop :for line := (read-line stream nil)
- :while line
- :collect (position-if-not (lambda (ch) (find ch #(#\space #\tab))) line))))
- (count-prefix-spaces-in-lines "/tmp/a.lisp")
- --> (0 2 4 10 10 nil 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement