6 lines
115 B
Clojure
6 lines
115 B
Clojure
(defn factorial [x]
|
|
(loop [x x
|
|
acc 1]
|
|
(if (< x 2)
|
|
acc
|
|
(recur (dec x) (*' acc x)))))
|