(put-in @{:a @{:aa 5} :b @{:bb 6}} [:c] 9) # => @{:a @{:aa 5} :b @{:bb 6} :c 9}
(put-in @{:a @{:aa 5} :b @{:bb 6}} [:a :aa] 9) # => @{:a @{:aa 9} :b @{:bb 6}}
(put-in @{:a @{:aa 5} :b @{:bb 6}} [:a :cc :ddd] 9) # => @{:a @{:cc @{:ddd 9} :aa 5} :b @{:bb 6}}
(put-in @[:a :b @[:aa :bb :cc]] [2 1] :zz ) # => @[:a :b @[:aa :zz :cc]]
(put-in @[:a :b @[:aa :bb :cc]] [5] :z ) # => @[:a :b @[:aa :bb :cc] nil nil :z]
(put-in @[:a :b @[:aa :bb :cc]] [4 0] :zz ) # => @[:a :b @[:aa :bb :cc] nil @{0 :zz}]
(put-in @[:a :b @[:aa :bb :cc]] [4 :yy] :zz ) # => @[:a :b @[:aa :bb :cc] nil @{:yy :zz}]