Handbook
Glossary
next-combination-with-replacement ( seq n -- )
Vocabulary
math
.
combinatorics
.
private
Inputs
seq
an
object
n
an
object
Outputs
None
Definition
USING:
kernel
math
sequences
;
IN:
math.combinatorics.private
::
next-combination-with-replacement
( seq n -- )
seq n 1
-
[
=
not
]
curry
find-last
drop
[|
i |
seq i
tail-slice
i seq
nth
1
+
[
[
drop
]
]
dip
[
]
curry
compose
map!
drop
]
when*
;
inline