Can you help me refactor this piece of clojure code to produce a seq?
- by ique
I want to produce a seq that I can later do a (map) over. It should look like this:
((0 0) (0 1) (0 2) (0 3) ... (7 7))
The piece of code I have to do it right now seems very, very ugly to produce such a simple result. I need some help getting this straight.
(loop [y 0 x 0 args (list)]
(if (and (= y 7) (= x 7))
(reverse (conj args (list y x)))
(if (= x 7)
(recur (+ y 1) 0 (conj args (list y x)))
(recur y (+ x 1) (conj args (list y x))))))