Advertisement
Guest User

Untitled

a guest
Jun 10th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. (with-open-file (in1 "/etc/passwd")
  2. (with-open-file (in2 "/etc/group")
  3. (let ((in (make-concatenated-stream in1 in2)))
  4. (loop
  5. for pee = (peek-char nil in nil nil)
  6. for ree = (read-char in nil nil)
  7. while (and (listen in) pee ree)
  8. collect pee into peeked
  9. collect ree into readed
  10. finally (assert (equal peeked readed))
  11. (return (list (length readed)
  12. (+ (file-length in1)
  13. (file-length in2))))))))
  14. --> (9543 9543)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement