Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (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)
- )
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement