I spent hour already and can not understand what is wrong here.

I want to filter collection based on a nested field of collection
element having some value:

(println pinned-ids)
; #{200, 210}

(println (contains? pinned-ids 200))
; true

(println (map #(.. % :field :id) new-states))
; (10 20 21 100 200 500 400 210) ; This collection contains both 200 and 210

However no test is true
(println (map #(contains? pinned-ids (.. % :field :id)) new-states))
; (false false false false false false false false)

Why "contains?" return false for all elements despite that set
pinned-ids contains some of elements?

-- 
Petr Gladkikh

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to