How to remove multiple keys from a map?

前端 未结 4 612
难免孤独
难免孤独 2020-12-29 20:13

I have a function that removes a key from a map:

(defn remove-key [key map]
  (into {}
        (remove (fn [[k v]] (#{key} k))
                map)))

(remov         


        
4条回答
  •  温柔的废话
    2020-12-29 20:43

    I found this type of thing and others to be super annoying in clojure, so to fix it I created the library instar: https://github.com/boxed/instar .

提交回复
热议问题