# this is, obviously, just an apex exploration | |
# i.e. horribly inefficient | |
Integer fib(Integer n) { | |
if (n <= 1) return 1; else return fib(n-1) + fib(n-2); | |
} | |
for (Integer i=0; i<=12; i++) { | |
System.debug(fib(i)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment