Handbook
Glossary
longest-prime ( seq limit -- pair )
Vocabulary
project-euler
.
050
.
private
Inputs
seq
an
object
limit
an
object
Outputs
pair
an
object
Definition
USING:
arrays
kernel
math.primes
sequences
;
IN:
project-euler.050.private
:
longest-prime
( seq limit -- pair )
dupd
sum-upto
dup
prime?
[
2array
nip
]
[
[
head-slice
]
dip
pop-until-prime
[
length
]
dip
2array
]
if
;