OrderedQ
OrderedQ({a, b,...})
is
True
ifa
sorts beforeb
according to canonical ordering for all adjacent elements.
OrderedQ({a, b,...}, comparator)
is
True
ifa
sorts beforeb
according to thecomparator
functions value for all adjacent elements. If thecomparator
function returnsFalse
or-1
theOrderedQ
function returnsFalse
. If thecomparator
function doesn’t returnFalse
or-1
for all adjacent elements theOrderedQ
function returnsTrue
.
See
Examples
>> OrderedQ({a, b})True
>> OrderedQ({b, a})False
Implementation status
- ✅ - full supported