Random thoughts of an IT worker in the stone age of computer science.
(n: Int) => (2 to n) |> (r => r.foldLeft(r.toSet)((ps, x) => if (ps(x)) ps -- (x * x to n by x) else ps))
This one liner would be much more readable as a multiline expression... Too many parentheses.
This comment has been removed by the author.
This one liner would be much more readable as a multiline expression... Too many parentheses.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete