clojure - how to check if a nested key exists in a map -


I want to see that each vector [: e [: a: b] is given in:: c Are: D]] is present in a map

{: E2: a {: b3}: c {: d 5}}

I can write to check the following -

  (def kvs {: e 2: a {: b 3}: c {: d 5}}) (each ? # (Includes? Kvs%) [[e] [: a: B] [: c: d]])   

However due to failure in the above Like the update does not check the deeper key level. An improvement on the basic view of idol worship, which works during the map, also works.

zero (or not - has been found) (not-any? (For [Ks keyseqs] (found in MKs not found)))))) Users & gt; (Each? {: E2: A {: B3}: C {: D5}} [[E: E] [: A: B] [: C: D]]) True User & gt; (Each? {: E2: A}: C {: D5}} [[E: E] [: A: B] [: C: D: E]]) Wrong < / Pre>

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -