Handbook
Glossary
find-cycle ( polygons chain length -- chain )
Vocabulary
project-euler
.
061
Inputs
polygons
an
object
chain
an
object
length
an
object
Outputs
chain
an
object
Definition
USING:
kernel
sequences
;
IN:
project-euler.061
:
find-cycle
( polygons chain length -- chain )
2dup
[
length
]
dip
=
[
drop
nip
[
cycle?
]
1guard
]
[
[
dupd
links
]
dip
[
find-cycle
]
curry
with
map-find
drop
]
if
;