dot Net行者
一個關於.Net技術的博客
2011年11月21日星期一
CoffeeScript中的Sieve of Eratosthenes
短短的一行
(n) -> (p.push i for i in [2..n] when !(p or p=[]).some((j) -> i%j is 0)) and n in p
沒有留言:
發佈留言
較新的文章
較舊的文章
首頁
訂閱:
發佈留言 (Atom)
沒有留言:
發佈留言