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