Handbook
Glossary
(euler186) ( generator counter unionfind -- counter )
Vocabulary
project-euler
.
186
Inputs
generator
an
object
counter
an
object
unionfind
an
object
Outputs
counter
an
object
Definition
USING:
disjoint-sets
kernel
math
;
IN:
project-euler.186
:
(euler186)
( generator counter unionfind -- counter )
524287
over
equiv-set-size
990000
<
[
pick
[
next
]
[
next
]
bi
2dup
=
[
2drop
]
[
pick
equate
[
1
+
]
dip
]
if
(euler186)
]
[
drop
nip
]
if
;