Skip to content

Instantly share code, notes, and snippets.

@theraphim
Created October 2, 2015 18:15
Show Gist options
  • Save theraphim/01c80ed204643a8ca684 to your computer and use it in GitHub Desktop.
Save theraphim/01c80ed204643a8ca684 to your computer and use it in GitHub Desktop.
I have no idea what this is.
val n: Stream[Int] = Stream.cons(2, Stream.from(3,2) filter(x => n.takeWhile(p => p*p <= x) forall(x % _ != 0)))
n takeWhile(_ < 1000) foreach println
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment