JanetDocs
Playground
I'm feeling lucky
GitHub sign in
Run
Format
(defn ddup [ds ks val] (update-in ds ks (fn [x] (if (= nil x) @[val] (array/push x val))))) (var a @{}) (ddup a [:a] 1) (ddup a [:a] 2) (ddup a [:a] 3) # @{:a @[1 2 3]}