# Get an array of the contained elements
# Order is preserved
#
# var tree = new OrderedTree[Int]
# tree.add_all(null, [1, 2])
# tree.add_all(1, [11, 12])
# tree.add_all(11, [111, 112])
# tree.add_all(12, [121, 122])
# tree.add_all(2, [21, 22])
# assert tree.to_a == [1, 11, 111, 112, 12, 121, 122, 2, 21, 22]
redef fun to_a: Array[E] do
var res = new Array[E]
for r in roots do sub_to_a(r, res)
return res
end
lib/ordered_tree/ordered_tree.nit:202,2--216,4