Merge pull request #1377 from sjakobi/patch-1
sequtils: Correct documentation for keepIf proc
This commit is contained in:
commit
188df67677
1 changed files with 1 additions and 1 deletions
|
|
@ -186,7 +186,7 @@ proc keepIf*[T](seq1: var seq[T], pred: proc(item: T): bool {.closure.}) =
|
||||||
##
|
##
|
||||||
## .. code-block:: nimrod
|
## .. code-block:: nimrod
|
||||||
## var floats = @[13.0, 12.5, 5.8, 2.0, 6.1, 9.9, 10.1]
|
## var floats = @[13.0, 12.5, 5.8, 2.0, 6.1, 9.9, 10.1]
|
||||||
## filter(floats, proc(x: float): bool = x > 10)
|
## keepIf(floats, proc(x: float): bool = x > 10)
|
||||||
## assert floats == @[13.0, 12.5, 10.1]
|
## assert floats == @[13.0, 12.5, 10.1]
|
||||||
var pos = 0
|
var pos = 0
|
||||||
for i in 0 .. <len(seq1):
|
for i in 0 .. <len(seq1):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue