-
-
Save xyhp915/3b34db732f58cf1effdc8fb4f16822cc to your computer and use it in GitHub Desktop.
deselect-keys: Complement to clojure.core.select-keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns core-util | |
(:require [clojure.set :as set])) | |
(defn deselect-keys | |
"Returns a map containing only those entries in map whose key is not in ks" | |
[m ks] | |
(->> (set/difference (set (keys m)) (set ks)) | |
(select-keys m))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment