I want to write a function Base.show
for my structure Node
:
mutable struct Node
keys::Vector
vals::Vector
count::Int
end
and which will display:
nod = Node(
["a", "b", "c", "d"],
[Node(
["aA", "aB", "aC"],
[11, 12, 13],
3,
), 2, 3, 4],
4
)
as well as display OrderedDict
the following dict:
dict_ord = OrderedDict(
"a" => OrderedDict(
"aA" => 11,
"aB" => 12,
"aC" => 13,
),
"b" => 2,
"c" => 3,
"d" => 4,
)