我怎样才能在clojure中进行取幂?现在我只需要整数取幂,但问题也适用于分数 ... (defn exp [x n] (loop [acc 1 n n] (if (zero? n) acc (recur (* x acc) (dec n))))).
確定! 回上一頁