Skip to content

Signature

Returns 1 / -1 / 0 for the signature of a permutation.

$ wo 'Signature[{1, 2, 3}]'
1
$ wo 'Signature[{2, 1, 3}]'
-1