Core may do what you need but for future needs you might reach for Nathan
Marz's specter library which helps navigate and manipulate complex Clojure data:
https://github.com/nathanmarz/specter
Take care.
Alan
--
You received this message because you are subscribed to the Google
Groups "Clojur
Thanks for the replies. Certainly naming the function is a good idea. But
although it avoid using anonymous functions, I was also wondering if there
were existing core functions that could search a list of hashes - it seems
like something that would have come up before. Then again, possibly it's
You could use 'select-keys' to filter the hashmaps;
(defn submap?
[m1 m2]
(= m1 (select-keys m2 (keys m1
(filter (partial submap? {:quad-col 0 :quad-row 0}) test-galaxy)
(filter (partial submap? {:sec-row 4 :sec-col 4}) test-galaxy)
(filter (partial submap? {:type :star}) test-galaxy)
--
Hey cycl...@speakeasy.net,
Jay's excellent main point is really about the use of anonymous functions-
that in many cases it's an anti-pattern.
Having a name for every function means that those functions become testable
and that code consuming those functions stays readable.
Another point is that