method is_sorted
Contract
Return typewob
Parameter keyDefault valueType
ordering_methodobject_less_or_equalvar
Water Contract
<method is_sorted
  ordering_method=object_less_or_equal/>

See also: sort

If the vector fields of _subject are ordered according to the predicate of the first argument, then the call to is_sorted result=true otherwise it returns false. If a vector is unordered, it can be ordered using sort is_sorted just tests to see if the vector actually is sorted. It is much faster than sort. The sorting predicate defaults to object_less
<vector 15 16 17/>.<is_sorted/>
true
<vector 94 16 17/>.<is_sorted/>
false
<vector 94 93 92/>.<is_sorted number.more/>
true
4.<is_sorted/>true
Above returns true because 4 is of zero length and any zero length object is considered to be sorted regardless of predicate.