Handbook
Glossary
permutation-bits-quot ( bit-count bits quot -- n pred body )
Vocabulary
math
.
combinatorics
.
bits
.
private
Inputs
bit-count
an
object
bits
an
object
quot
an
object
Outputs
n
an
object
pred
an
object
body
an
object
Definition
USING:
kernel
math
math.bitwise
math.combinatorics.bits
;
IN:
math.combinatorics.bits.private
:
permutation-bits-quot
( bit-count bits quot -- n pred body )
[
[
on-bits
dup
[
[
dup
]
]
dip
[
>=
]
curry
compose
]
[
on-bits
]
bi*
]
dip
swap
[
[
next-permutation-bits
]
]
dip
[
bitand
]
curry
compose
[
bi
]
2curry
;
inline