Here is the Fibonacci code on the Elm syntax page. Just curious does recursion need to be memoized or does lazy evaluation take care of it?
fib n = case n of
0 -> 1
1 -> 1
_ -> fib (n-1) + fib (n-2)
In other languages (such as Python) the number of function calls would grow exponentially in n
so that in if f(30)
would compute f(10)
like 4000 times or someting.