Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
6 lines (5 sloc) 169 Bytes
object Euler002 extends EulerApp {
def fib (a :Int, b :Int) :Int =
(if (b % 2 == 0) b else 0) + (if (a+b > 1000000) 0 else fib(b, a+b))
def answer = fib(1, 2)
}