type Node = ref object children: seq[string] proc main = var b = Node(children: newSeq[string](1)) echo "b:", b.repr b.children[0] = "Hello World" echo "b:", b.repr main()
Standard input is empty
b:ref 0xb75dd028 --> [children = 0xb75de028[nil]] b:ref 0xb75dd028 --> [children = 0xb75de028[0xb75e1168"Hello World"]]