From dc41beed5a00db02b8d4accf40916b5684df3c3b Mon Sep 17 00:00:00 2001 From: apense Date: Thu, 18 Jun 2015 18:53:42 -0400 Subject: [PATCH] Added documentation Now `isSorted` is documented. --- lib/pure/algorithm.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/pure/algorithm.nim b/lib/pure/algorithm.nim index b6bcdab7e9..ac18ae4204 100644 --- a/lib/pure/algorithm.nim +++ b/lib/pure/algorithm.nim @@ -240,6 +240,9 @@ template sortedByIt*(seq1, op: expr): expr = proc isSorted*[T](a: openarray[T], cmp: proc(x, y: T): int {.closure.}, order = SortOrder.Ascending): bool = + ## Checks to see whether `a` is already sorted in `order` + ## using `cmp` for the comparison. Parameters identical + ## to `sort` result = true for i in 0.. 0: