Handbook
Glossary
lprimes-from ( n -- list )
Vocabulary
math
.
primes
.
lists
Inputs
n
an
integer
Outputs
list
a lazy list
Word description
Return a sorted list containing all the prime numbers greater or equal to
n
.
Definition
USING:
kernel
lists.lazy
math
math.primes
;
IN:
math.primes.lists
:
lprimes-from
( n -- list )
dup
3
<
[
drop
lprimes
]
[
1
-
next-prime
[
next-prime
]
lfrom-by
]
if
;