(defun read-values (file) (with-open-file (stream file) (loop for value = (read stream NIL) while value collect value))) (defun dip1 (file) (loop for (a b) on (read-values file) while b count (< a b))) (defun dip2 (file) (loop with window = 0 for (a b c) on (read-values file) while c count (< window (+ a b c)) do (setf window (+ a b c))))