You are viewing a single comment's thread. Return to all comments →
Scala Code : One liner List.fill(x-1)(0).foldLeft((0,1))( (a,b) => (a._2,a._1+a._2))._1
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
Scala Code : One liner List.fill(x-1)(0).foldLeft((0,1))( (a,b) => (a._2,a._1+a._2))._1