Handbook
Glossary
find-combination-with-replacement ( ... seq k quot: ( ... elt -- ... ? ) -- ... elt/f )
Vocabulary
math
.
combinatorics
Inputs
seq
an
object
k
an
object
quot
a
quotation
with stack effect
( ... elt -- ... ? )
Outputs
elt/f
an
object
Definition
USING:
kernel
math.combinatorics.private
sequences
;
IN:
math.combinatorics
:
find-combination-with-replacement
( ... seq k quot: ( ... elt -- ... ? ) -- ... elt/f )
[
f
]
3dip
[
[
nip
]
]
dip
[
1check
]
curry
compose
combinations-with-replacement-quot
find
drop
and*
;
inline