Handbook
Glossary
next-selection ( seq n -- )
Vocabulary
math
.
combinatorics
.
private
Inputs
seq
an
object
n
an
object
Outputs
None
Definition
USING:
kernel
math
sequences
sequences.private
;
IN:
math.combinatorics.private
::
next-selection
( seq n -- )
1 seq
length
1
-
[
dup
0
>=
[
over
0
=
]
[
t
]
if
]
[
[
seq
[
+
n
/mod
]
change-nth-unsafe
]
keep
1
-
]
do
until
2drop
;
inline