Y
Hacker News
new
|
ask
|
show
|
jobs
by
arunix
92 days ago
On the front page, there is an example about optional typing, but it's not very clear how the typing is coming in:
def fib(x) { x <= 2 ? 1 : fib(x - 1) + fib(x - 2) } println "40th fibonacci number is ${fib(40)}"