mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
12 lines
195 B
Nim
12 lines
195 B
Nim
discard """
|
|
output: '''true'''
|
|
"""
|
|
|
|
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)
|
|
echo x == @[5111, 5112, 5113]
|