Skip to main content

> — Sort down / Greater

Function. Hanzi: 大. Ranks: ∞ monadic, 0 0 dyadic

>Y sorts the major cells of Y descending, as [⍒Y]⌷Y does. Ties keep their order.

>30 10 20           ⍝ 30 20 10
>"b" "a" "c"        ⍝ "c" "b" "a"

X>Y tests X > Y for reals, and for characters by code point. A number is less than any character, as ⍋ orders them. Pervasive; tolerant.

1 2 3>2            ⍝ $f $f $t
"abd">"abc"        ⍝ $f $f $t
'a'>3              ⍝ $t

See < to sort up, and ⍒ for the indices that sort.

Fast combinations

BPL computes each of these combinations by an algorithm of its own, in any spelling. Trains says which spellings BPL recognises.

Combination Applies to Benefit
k↑>Y, k↑> Y or (k↑)∘> a vector of reals or characters without keys selects the k largest items, or the -k smallest, without ordering the rest
↑>Y, i⌷>Y or i⊃>Y the same vectors selects the item of rank i from the top without ordering the rest
v←30 10 20 50 40 60 70 80 90 0
2↑> v                               ⍝ 90 80
↑> v                                ⍝ 90
(•explain "↑> v").fast.rule         ⍝ ["partial sort"]