Post History
APL (Dyalog Unicode), 3 bytes ⍋≡⍒ Try it online! ⍋ computes the permutation vector that would sort the argument into ascending order ⍒ computes the permutation vector that would sort the ar...
#1: Initial revision
# [APL (Dyalog Unicode)], 3 bytes
<!-- language-all: lang-apl -->
⍋≡⍒
[Try it online!][TIO-ks7j04ev]
`⍋` computes the permutation vector that would sort the argument into ascending order
`⍒` computes the permutation vector that would sort the argument into descending order
If they are identical (`≡`), all elements must be equal.
See also [this talk](https://dyalog.tv/APLSeeds21/?v=GZuZgCDql6g) by Conor Hoekstra.
[APL (Dyalog Unicode)]: https://www.dyalog.com/
[TIO-ks7j04ev]: https://tio.run/##SyzI0U2pTMzJT////1Fv96POhY96J/1Pe9Q24VFv36Ou5ke9ax71bjm03vhR28RHfVODg5yBZIiHZ/D/NAVDHSjkSlMwALPMdMyBbLAAUCMA "APL (Dyalog Unicode) – Try It Online"
