Dave Tenny wrote:
Specter looks nice.  I didn't see any examples in the readme or tests
for working with more deeply nested data structures such as those
discussed in this thread, any pointers?

Here's an example that might be relevant to the original question. Suppose you have this structure:

    (def deep {:a [{:b [{:key 33 :uuid "zyx"}]}
                   {:b [{:key 4, :uuid "zzz"}]}]})

You want to print out the terminal maps where the `:uuid` is "zyx". You can do that like this:

    user=> (select [:a ALL :b ALL #(= "zyx" (:uuid %))] deep)
    [{:key 33, :uuid "zyx"}]


My `structural-typing` library builds a DSL for sort-of type declarations on top of specter. https://github.com/marick/structural-typing/ The code is kind of tricksy in the parts that use Specter, so I don't know if it'll be of much help.

I plan to propose a short (50 pp.) booklet on specter, to be published on Leanpub. I'll announce it on this mailing list shortly, and use Leanpub to gauge whether there's enough interest.



--
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
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to