Added a functional version using recur. Apparently Clojure can't handle true tail-call optimization due to the JVM. I should add a link from Rich Hickey's post explaining why.