Removed redundant check

Loop takes care of it already
This commit is contained in:
apense
2015-06-18 14:43:38 -04:00
parent 3491047141
commit 138cf777da

View File

@@ -240,8 +240,6 @@ template sortedByIt*(seq1, op: expr): expr =
proc isSorted*[T](a: openarray[T],
cmp: proc(x, y: T): int {.closure.},
order = SortOrder.Ascending): bool =
if len(a) <= 1: return true
result = true
for i in 0..<len(a)-1:
if cmp(a[i],a[i+1]) * order > 0: