I have been coming up to speed using the Clojure Specter library (https://github.com/nathanmarz/specter). What I am having an issue with is removing a key using transform or setval. I can set it to nil, but how do I remove a key?
(setval :a NONE {:a 10 :b 20})
=> {:b 20}
This seems to work:
(transform [ALL] #(when (not= (key %) :a) %) {:a 1 :b 2})
=> {:b 2}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With