Handbook
Glossary
count-combinations ( ... seq k quot: ( ... elt -- ... ? ) -- ... n )
Vocabulary
math
.
combinatorics
Inputs
seq
an
object
k
an
object
quot
a
quotation
with stack effect
( ... elt -- ... ? )
Outputs
n
an
object
Definition
USING:
kernel
math
;
IN:
math.combinatorics
:
count-combinations
( ... seq k quot: ( ... elt -- ... ? ) -- ... n )
0
swap
[
[
1
+
]
when
]
compose
reduce-combinations
;
inline