Created
October 5, 2016 02:40
-
-
Save Keita-N/9bfdab2e53aa152294d35059f29ecfbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{def f(a:Int,n:Int,m:Int):Stream[Int]=if(a==m)f(a+n,n+1,m+1)else m #::f(a,n,m+1) | |
f(1,2,1)}.takeWhile(_<101).foreach(println) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment