Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active May 27, 2017 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/4aa34d744e963054a47d1ea99d214f51 to your computer and use it in GitHub Desktop.
Save deque-blog/4aa34d744e963054a47d1ea99d214f51 to your computer and use it in GitHub Desktop.
(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