Handbook
Glossary
(closure-limit) ( vertex set quot: ( vertex -- edges ) i n -- )
Vocabulary
combinators
.
extras
.
private
Inputs
vertex
an
object
set
an
object
quot
a
quotation
with stack effect
( vertex -- edges )
i
an
object
n
an
object
Outputs
None
Definition
USING:
kernel
math
sequences
sets
shuffle
;
IN:
combinators.extras.private
:
(closure-limit)
( vertex set quot: ( vertex -- edges ) i n -- )
2dup
<
[
[
1
+
]
dip
2reach
?adjoin
[
[
[
dip
]
keep
]
2dip
[
(closure-limit)
]
3curry
curry
each
]
[
5drop
]
if
]
[
5drop
]
if
;
inline
recursive