Open PEZ opened 1 year ago
I don't know if this is a bug or just out of scope of the library:
(supdate #{} [identity]) => ()
I was expecting:
(supdate #{} [identity]) => #{}
I noticed it when reading this medley PR description: https://github.com/weavejester/medley/issues/63
I tried to solve the example with supdate (mostly to learn how supdate works), and found myself having to restore the set type the orders collection:
supdate
set
(def m {:users [{:id 1 :orders #{{:items [{:price 1} {:price 4} {:price 2}]}}} {:id 2 :orders #{}}]}) (-> m (supdate {:users [{:orders [{:items [{:price #(str "$" %)}]}]}]}) (supdate {:users [{:orders set}]})) => {:users [{:id 1 :orders #{{:items [{:price "$1"} {:price "$4"} {:price "$2"}]}}} {:id 2 :orders #{}}]}
I don't know if this is a bug or just out of scope of the library:
I was expecting:
I noticed it when reading this medley PR description: https://github.com/weavejester/medley/issues/63
I tried to solve the example with
supdate
(mostly to learn howsupdate
works), and found myself having to restore theset
type the orders collection: