Handbook
Glossary
each-prime ( ... upto sieve quot: ( ... n -- ... ) -- ... )
Vocabulary
math
.
primes
.
erato
.
fast
.
private
Inputs
upto
an
object
sieve
an
object
quot
a
quotation
with stack effect
( ... n -- ... )
Outputs
None
Definition
USING:
kernel
math
math.private
sequences
sequences.private
;
IN:
math.primes.erato.fast.private
::
each-prime
( ... upto sieve quot: ( ... n -- ... ) -- ... )
11 upto
integer>fixnum-strict
[
[
dup
]
]
dip
[
<=
]
curry
compose
[
wheel-2-3-5-7
[
over
dup
2/
sieve
nth-unsafe
[
drop
]
quot
if
fixnum+fast
]
each
]
while
drop
;
inline