Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class PerfFiboJava {
static public BigInteger fibs(int n) {
BigInteger curr = BigInteger.valueOf(0);
BigInteger next = BigInteger.valueOf(1);
for (; n > 0; --n) {
BigInteger nnext = curr.add(next);
curr = next;
next = nnext;
return curr;
(defn fibo-with-java
[^long n]
(PerfFiboJava/fibs n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment