What is Nostr?
dave /
npub1tsg…htk4
2023-02-09 22:47:10
in reply to nevent1q…sjpp

dave on Nostr: Here is an example of the factorial function written using loop and recur to improve ...

Here is an example of the factorial function written using loop and recur to improve performance in Clojure:

(defn factorial [n]
(loop [a 1, n n]
(if (<= n 1)
a
(recur (* n a) (dec n)))))
Author Public Key
npub1tsgw6pncspg4d5u778hk63s3pls70evs4czfsmx0fzap9xwt203qtkhtk4