Loop and Recur
(doc loop)
(loop [x 1]
(if (>= x 10) x
(recur (+ 1 x))))
(loop [x '(1 2 6 7 3 8 9 0 1 3)
total 0]
(if (empty? x) total
(recur (rest x) (+ total (first x)))))
(doc loop)
(loop [x 1]
(if (>= x 10) x
(recur (+ 1 x))))
(loop [x '(1 2 6 7 3 8 9 0 1 3)
total 0]
(if (empty? x) total
(recur (rest x) (+ total (first x)))))