IR: nsieve ( int bool[] -- int ) [ [ >m ] [ >isPrimt ] bi* 2 m> [a,b] [ true swap isPrime> set-at ] for 0 >count 2 m> [a,b] [ >i i> isPrime> at [ i> dup + m> i> [ false swap isPrime> set-at ] for count> ++ ] when ] for count> ] ; static int nsieve(int m, boolean[] isPrime) { for (int i=2; i <= m; i++) isPrime[i] = true; int count = 0; for (int i=2; i <= m; i++) { if (isPrime[i]) { for (int k=i+i; k <= m; k+=i) isPrime[k] = false; count++; } } return count; }