Shor's algorithm in Clojure