|
Example Directory sort 007
|
Description
These examples show how the sort function sorts the
elements of the Directory by comparing its keys. These examples
use the (sort dir predicate ) without the optional keywords.
Details
Sort a Directory by keys in descending order.
(sort #{dir|A: 2 B: 3 C: 1} >)
|
Returns: #<Directory 123456>
|
(display #<Directory 123456> )
|
Returns: #{dir|C: 1 B: 3 A: 2}
|
Sort a Directory by keys in ascending order.
(sort #{dir| C: 2 F: 3 F: 1 A: 4 G: 2 C: 5} <)
|
Returns: #<Directory 234567>
|
(display #<Directory 234567>)
|
Returns: #{dic|| A 4 C 5 F 1 G 2}true
|
Notes and Hints
Only the keys are sorted. No regard is given to the value even if the
keys are equal.
Related Examples
Here are examples of the sort function at work.
Function Links
Here is the link to the current function used in this example.
sort
Here are a number of links to other related functions.
Argument Types
Here are the links to the data types of the arguments used in this example.
Here are a number of links to examples having similar argument types.
|
Analytic Information Server (AIS)
AIS Component Systems
- Smartbase Engine
- QT C++ Libraries
- MySQL Relational Database
- AIS Lisp Libraries
- Rapid Analytic Demo IDE
|