Handbook
Glossary
mark-multiples ( i upto sieve -- )
Vocabulary
math
.
primes
.
erato
.
fast
.
private
Inputs
i
an
object
upto
an
object
sieve
an
object
Outputs
None
Definition
USING:
kernel
math
math.private
sequences.private
;
IN:
math.primes.erato.fast.private
::
mark-multiples
( i upto sieve -- )
i 2
fixnum*fast
:>
step i i
fixnum*fast
upto
integer>fixnum-strict
[
[
dup
]
]
dip
[
<=
]
curry
compose
[
t
over
2/
sieve
set-nth-unsafe
step
fixnum+fast
]
while
drop
;
inline