Skip to content

Commit

Permalink
Create Problem7.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
ditekunov authored Jun 4, 2018
1 parent 87ef81c commit bf55775
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scala/Problem7.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lazy val ps: Stream[Int] = 2 #:: Stream.from(3).filter(i =>
ps.takeWhile(j => j * j <= i).forall(i % _ > 0))

val r = ps(10000)

0 comments on commit bf55775

Please sign in to comment.