Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn find-map-with-key-some [targetCollection targetKey targetValue]
- (some
- #(when (and (map? %) (contains? % targetKey) (= (get targetValue targetKey) targetValue)) %)
- targetCollection))
- (let [ex1 {:key1 "a" :key2 "b" :key3 {:underKey1 "a2" :underKey2 "b2"}}]
- (find-map-with-key-some ex1 :underKey1 "a2"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement