Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn fibo-recur-java-bigint
[^long n]
(loop [curr (BigInteger/valueOf 0)
next (BigInteger/valueOf 1)
n n]
(if-not (zero? n)
(recur next (.add curr next) (dec n))
curr)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment