Handbook
Glossary
(4-digit-polygons) ( s -- seq )
Vocabulary
project-euler
.
061
Inputs
s
an
object
Outputs
seq
an
object
Definition
USING:
arrays
kernel
math
sequences
;
IN:
project-euler.061
:
(4-digit-polygons)
( s -- seq )
[
V{
}
clone
1
]
dip
[
2dup
nth-polygon
dup
9999
>
]
[
dup
1000
>=
[
dupd
2array
reach
push
]
[
drop
]
if
[
1
+
]
dip
]
until
3drop
;