Handbook
Glossary
combinations-quot ( seq k quot -- seq quot' )
Vocabulary
math
.
combinatorics
.
private
Inputs
seq
an
object
k
an
object
quot
an
object
Outputs
seq
an
object
quot'
an
object
Definition
USING:
arrays
kernel
math.combinatorics
sequences
;
IN:
math.combinatorics.private
::
combinations-quot
( seq k quot -- seq quot' )
seq
length
:>
n n k
nCk
<iota>
k
<iota>
>array
seq quot n
[
[
[
nths-unsafe
]
curry
]
dip
compose
]
dip
[
[
[
[
drop
]
]
dip
]
dip
[
keep
]
2curry
compose
]
dip
[
next-combination
]
curry
compose
;
inline