|
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 dir predicate ) (sort dir predicate true)) If {true} is present, an integer vector containing the sorted indices to
the directory is returned. If {true} is not present, the sorted directory 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 dir The directory to be sorted Directory predicate predicate > means sort in descending order, predicate < means sort in
ascending order true Optional argument: If present it means to return an integer vector
containing sorted indices to the directory. Boolean
Returns:
Examples
Argument Types
Structure
Dictionary
Directory
List
NumMatrix
ShortVector
Matrix
Vector
String
Text
Integer
Boolean
How do I contact the AIS team?