Handbook
Glossary
primes-upto ( n -- seq )
Prime numbers
Prev:
next-prime ( n -- p )
Next:
primes-between ( low high -- seq )
Vocabulary
math
.
primes
Inputs
n
an
integer
Outputs
seq
a
sequence
Word description
Return a sequence containing all the prime numbers smaller or equal to
n
.
See also
nprimes
,
primes-between
Definition
USING:
kernel
;
IN:
math.primes
:
primes-upto
( n -- seq )
2
swap
primes-between
;