Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
ListTools[Sorted] - test if a list is sorted
Calling Sequence
Sorted(L, f, opts)
Parameters
L
-
list
f
(optional) procedure
opts
(optional) extra arguments to procedure f
Description
The Sorted(L) function returns the value true if list L is sorted according to certain conditions; otherwise, false is returned.
If list L is a list of numeric values, then the elements of L are tested as to whether they are in ascending order.
If L is a list of strings or symbols, the elements of L are tested as to whether they are in lexicographical order.
Otherwise, Sorted(L) tests whether the elements in list L are in address order.
If the optional argument f is specified as either `<` or `>`, the list must contain numeric values and the elements of the list are tested as to whether they are in ascending or descending order, respectively. Otherwise, the expression is evaluated to determine whether element x precedes element y, where x and y are consecutive elements in list L.
Examples
See Also
list, ListTools, map, type[list], type[numeric], type[string], type[symbol]
Download Help Document