proc working(source: seq[int]): seq[int] =
result = newSeq[int](len(source))
for i in 0..<source.len:
result[i] = source[i]
proc broken(source: seq[int]): seq[int] =
var p = newSeq[int](len(source))
for i in 0..<source.len:
p[i] = source[i]
return p
var source = newSeq[int](3)
source[0] = 1
source[1] = 2
source[2] = 3
let copy1 = working(source)
let copy2 = broken(source)
echo "orig: ", source
echo "copy 1: ", copy1
echo "copy 2:", copy2