Skip to content
Gregg Irwin edited this page Jul 25, 2018 · 1 revision

Sort is a powerful and flexible function in Red, giving you control over sort stability, case sensitivity, partial sorting of series, what is compared when sorting compound values, and defining a custom comparator.

Refinements

/case

/skip

/compare

/part

/all

/reverse

/stable

Datatype sorting

Just as spreadsheets sort by the 3 types they understand (number, string, and boolean), Red does the same thing, except it does it for every datatype it understands. Within a given type, values sort as you expect.

EXAMPLE TBD

Map

Object

Pairs

Pairs sort first by their y value, then their x value.

Clone this wiki locally