Last active
June 19, 2023 04:13
-
-
Save shamsimam/fdc6a0fa6af5937794d57ad746a8313b to your computer and use it in GitHub Desktop.
deselect-keys: Complement to clojure.core.select-keys
This file contains hidden or 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