Handbook
Glossary
permutations-quot ( seq quot -- seq quot' )
Vocabulary
math
.
combinatorics
.
private
Inputs
seq
an
object
quot
an
object
Outputs
seq
an
object
quot'
an
object
Definition
USING:
arrays
kernel
math.combinatorics
sequences
;
IN:
math.combinatorics.private
:
permutations-quot
( seq quot -- seq quot' )
[
[
<permutation-iota>
]
[
length
<iota>
>array
]
[
]
tri
]
dip
'[
drop
_
[
_
nths-unsafe
@
]
keep
next-permutation
drop
]
;
inline