(defn f [i]
  (loop [cnt i, acc 1N]
    (if (zero? cnt)
      acc
      (recur (dec cnt) (* cnt acc)))))

(println (f 9999))