|
sort
|
The sort function returns a sorted copy of the specified
Structure, Dictionary, Directory, Vector, Matrix, Pair or List argument
{target} in the order specified by the argument predicate {predicate}.
If the optional Boolean argument {true} is present, the sort function does not
sort the specified target; but instead, returns a sorted integer vector of indices
into the specified target.
When to use The sort function can be used to sort an AIS Object by the values or by keys,
destructively or non-destructively.
(sort list predicate ) (sort list predicate true)) The sorted Matrix, or the integer Vector in case the argument {true} is specified, is returned.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types list The List to be sorted List predicate predicate > means sort in descending order, predicate < means sort in
ascending order true Optional keyword, if present, an integer Vector containing stored indices to the
List to be sorted. Boolean
Returns:
Examples
Argument Types
Structure
Dictionary
Directory
List
NumMatrix
ShortVector
Matrix
Vector
String
Text
Integer
Boolean
How do I contact the AIS team?