Thanks Daniel, I should have worked that out myself ;) Andreas On 03/04/2011, at 3:47 PM, Daniel Janus wrote:
> On 3 Kwi, 07:37, Andreas Kostler <andreas.koestler.le...@gmail.com> > wrote: > >> Hi Daniel, >> Thanks for your reply. I know how to get to :fred. >> I'm just wondering why some wouldn't work on maps. > > Well, `some' finds an element in a seq that satisfies the given > predicate, and seq'ing a map will get you a sequence of key/value > pairs. So, using a set as a predicate, you could test whether a given > key/value pair exists in a map: > > (some #{[:barney "rubble"]} {:fred "flinstone" :barney "rubble"}) > > So it does work on maps, albeit not in the way you'd expect it to. > > Daniel > > -- > 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 -- "Test-driven Dentistry (TDD!) - Not everything should be test driven" - Michael Fogus -- ********************************************************** Andreas Koestler, Software Engineer Leica Geosystems Pty Ltd 270 Gladstone Road, Dutton Park QLD 4102 Main: +61 7 3891 9772 Direct: +61 7 3117 8808 Fax: +61 7 3891 9336 Email: andreas.koest...@leica-geosystems.com ************www.leica-geosystems.com************* when it has to be right, Leica Geosystems Please consider the environment before printing this email. -- 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