by arunix · 2mo ago · 0 comments
def fib(x) { x <= 2 ? 1 : fib(x - 1) + fib(x - 2) } println "40th fibonacci number is ${fib(40)}"
No comments yet.