SORT

    Returns or stores the elements contained in the , set or at .

    By default, sorting is numeric and elements are compared by their value interpreted as double precision floating point number. This is SORT in its simplest form:

    1. SORT mylist

    When contains string values and you want to sort them lexicographically, use the !ALPHA modifier:

      Dragonfly is UTF-8 aware.

      Almost all modifiers can be used together. The following example will return the first 5 elements, lexicographically sorted in descending order:

      1. SORT mylist LIMIT 0 5 ALPHA DESC

      Return

      : list of sorted elements.