function add!(character_storage ::Dict{String,Int32}, acquired :: Pair{String,Int32})
push!(character_storage,acquired)
end
items = Dict{String,Int32}()
orb_of_health :: Pair = ("Orb" => 10)
According to the documentation, items
is bound to the Dict{String,Int32}()
.
- When the dictionary gets passed to
add!()
, is it correct to say thatcharacter_storage
is now bound to the dictionary? - Because Julia uses pass by sharing, and we shared a mutable dictionary, any changes made to
character_storage
are also made toitems
, because the dictionary now has two names bound to it, correct?