Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (with-open-file (in1 "/etc/passwd")
- (with-open-file (in2 "/etc/group")
- (let ((in (make-concatenated-stream in1 in2)))
- (loop
- for pee = (peek-char nil in nil nil)
- for ree = (read-char in nil nil)
- while (and (listen in) pee ree)
- collect pee into peeked
- collect ree into readed
- finally (assert (equal peeked readed))
- (return (list (length readed)
- (+ (file-length in1)
- (file-length in2))))))))
- --> (9543 9543)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement