You are viewing a single comment's thread. Return to all comments →
based on the classics of Scala Stream API example:
lazy val fibSteam:Stream[Int] = 0 #:: 1 #:: fibSteam.zip(fibSteam.tail).map( x => x._1 + x._2 ) fibSteam.take(x).last
Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
based on the classics of Scala Stream API example: