Handbook
Glossary
pop-until-prime ( seq sum -- seq prime )
Vocabulary
project-euler
.
050
.
private
Inputs
seq
an
object
sum
an
object
Outputs
seq
an
object
prime
an
object
Definition
USING:
kernel
math
math.primes
sequences
;
IN:
project-euler.050.private
:
pop-until-prime
( seq sum -- seq prime )
over
length
0
>
[
[
unclip-last-slice
]
dip
swap
-
dup
prime?
[
pop-until-prime
]
unless
]
[
2drop
{
}
0
]
if
;