Handbook
Glossary
inversions ( seq -- n )
Vocabulary
koszul
Inputs
seq
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
sequences
;
IN:
koszul
:
inversions
( seq -- n )
0
swap
[
length
<iota>
]
keep
[
[
nth
]
2keep
swap
1
+
tail-slice
(inversions)
+
]
curry
each
;