What is the idiomatic clojure for subset
:
user=> (subset [:a :b] {:a 1 :b 2 :c 3})
{:a 1 :b 2}
Thanks.
You are looking for the select-keys
function:
user=> (select-keys {:a 1 :b 2 :c 3} [:a :b])
{:b 2, :a 1}
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