Handbook
Glossary
find-permutation-bits ( ... bit-count bits quot: ( ... n -- ... ? ) -- ... elt/f )
Vocabulary
math
.
combinatorics
.
bits
Inputs
bit-count
an
object
bits
an
object
quot
a
quotation
with stack effect
( ... n -- ... ? )
Outputs
elt/f
an
object
Definition
USING:
kernel
math.combinatorics.bits.private
;
IN:
math.combinatorics.bits
:
find-permutation-bits
( ... bit-count bits quot: ( ... n -- ... ? ) -- ... elt/f )
[
f
f
]
3dip
[
2nip
]
prepose
[
1check
]
curry
permutation-bits-quot
[
[
pick
not
and
]
compose
]
dip
while
drop
and*
;
inline