|
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 sorts all the elements in a NumMatrix and returns the sorted
version of the NumMatrix . The sort function is destructive except for the option
containing the keyword {true}, which returns a new sorted integer NumMatrix .
(sort nummatrix predicate ) (sort nummatrix predicate true)) The sorted NumMatrix 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 nummatrix The NumMatrix to be sorted NumMatrix 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
NumMatrix 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?