(defn count-out-consecutive [matrix coords direction]
  (->> coords
       (iterate #(mapv + % direction))
       (map #(get-in matrix % ::not-found))
       (partition-by identity)
       first count))

(count-out-consecutive (repeat 3 (repeat 3 0)) [0 0] [1 1])