sequtils related changes
This commit is contained in:
parent
0a8a2070d0
commit
75097e2981
11 changed files with 211 additions and 88 deletions
7
tests/collections/tapply.nim
Normal file
7
tests/collections/tapply.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import sequtils
|
||||
|
||||
var x = @[1, 2, 3]
|
||||
x.apply(proc(x: var int) = x = x+10)
|
||||
x.apply(proc(x: int): int = x+100)
|
||||
x.applyIt(it+5000)
|
||||
doAssert x == @[5111, 5112, 5113]
|
||||
Loading…
Add table
Add a link
Reference in a new issue