What does ⍋⍋ even mean?

April 8, 2026
A serious businessman focusing intently on his work, using a laptop indoors.
Photo by MART PRODUCTION on Pexels

The question and the chase

It has been reported that a recent blog post on Wilson B.'s site revisits a taunt from Paul Mansour: if we're only dealing with permutations, ⍒⍋ is just a slower ⌽; if not, “even Adám doesn’t know what ⍒⍋ does,” he allegedly quipped. Confused APL-ists perked up. Who wouldn’t? A tiny pair of glyphs, and suddenly there’s a debate about identity, usefulness, and what “rank” really is. So what does ⍋⍋ mean — and why should anyone care?

The tidy answer

The short version: ⍋ indexes items by ascending rank; applying it twice yields the ranks themselves. Formally, treat an array’s items as subarrays along the first axis and define an item’s rank as its index in the ascending TAO order. ⍋Y produces the permutation that places items of Y in ascending order, so ⍋⍋Y maps each original item to its rank — a bona fide Rank function. Because ⍒ equals ⌽⍋, the symmetric constructions give you ReverseRank (count from the back) and the four combinations of leading/trailing Grade choose ascending/descending and Rank/ReverseRank.

Why this matters

There’s a small, satisfying click here — like finding the missing piece in a puzzle. The result cleans up folklore (and a few snarky takes) by showing these glyphs aren’t useless relics but algebraically meaningful primitives. Caveat: ties complicate things. Equal items are ranked in the same way by both ⍋ and ⍒, so Rank+ReverseRank isn’t a constant in the presence of duplicates; that nuance is exactly what Mansour later exploits with his AverageRank trick. For APL practitioners, that subtlety isn’t academic — it’s the difference between a neat identity and a tool you can actually rely on.

Sources: wilsonb.com, Hacker News