previous up contents next
Left: Subseq Up: Standard library function functions Right: Mode

Sort

Sort returns a sequence containing all the items in the type relevant path prefix, sorted in ascending order according to the sort order specified in the (global) sort directive.

    # sort integer.
    
    Sort:<> = .
    Sort:<c b a> = c b a.
    Sort:<3 2 1> = 1 2 3.
    Sort:<3 -2 1> = -2 1 3.
    Sort:<3 44 67 23 4 1 100> = 1 3 4 23 44 67 100.
    Sort:<3 44 67 23 44 foo 1 92> = 3 23 44 44 67 foo 1 92.

    # sort ascii.
    
    Sort:<> = .
    Sort:<c b a> = a b c.
    Sort:<3 2 1> = 1 2 3.
    Sort:<3 44 67 23 4 1 100> = 1 100 23 3 4 44 67.
    Sort:<3 44 67 23 44 foo 1 92> = 1 23 3 44 44 67 92 foo.


---------------------------------------------------------

Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998