Merge pull request #1045 from barcharcraz/lowerBound

fixed doc comment
This commit is contained in:
Andreas Rumpf 2014-03-28 23:13:41 +01:00
commit 05421cf84b

View file

@ -64,10 +64,11 @@ proc lowerBound*[T](a: openarray[T], key: T, cmp: proc(x,y: T): int {.closure.})
## `cmp` is the comparator function to use, the expected return values are the same as ## `cmp` is the comparator function to use, the expected return values are the same as
## that of system.cmp ## that of system.cmp
## ##
## example: ## example::
## `var arr = @[1,2,3,5,6,7,8,9]` ##
## `arr.insert(4, arr.lowerBound(4))` ## var arr = @[1,2,3,5,6,7,8,9]
## after running the above arr is `[1,2,3,4,5,6,7,8,9]` ## arr.insert(4, arr.lowerBound(4))
## `after running the above arr is `[1,2,3,4,5,6,7,8,9]`
result = a.low result = a.low
var pos = result var pos = result
var count, step: int var count, step: int