(defn count-out-consecutive ([count] count) ([matrix [x y] turn-vec] (count-out-consecutive matrix [x y] turn-vec ((matrix y) x) 0)) ([matrix [x y] turn-vec value count] (if (= (get (get matrix y) x) value) (recur matrix [(+ x (turn-vec 0)) (+ y (turn-vec 1))] turn-vec value (inc count)) (count-out-consecutive count) ) ) )