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
[
[
nths-unsafe
]
curry
]
dip
compose
[
[
[
drop
]
]
dip
]
dip
[
keep
next-permutation
drop
]
2curry
compose
;
inline