On Mar 8, 2017 5:44 PM, "Edwin Watkeys" <e...@poseur.com> wrote:
Hey, The recent heat about Specter got me thinking. There's legitimate pain that Spectre solves: Responsible adults sometimes needs to access and modify deeply nested data structures, and Clojure's batteries-included facilities for doing so can be tedious. But Specter is deeply un-Clojure-y, and, more to the point, I would say Nathan is basically Bizzaro-Rich.* There has to be some Clojure-idiomatic ways of solving the common problems we confront, and I believe that one of the things we need to do to help discover those approaches, I think experimentation is in order. My contribution, my attempt, my essay to that end is cli-lens, available here: <https://github.com/edw/clj-lens>. Here's the example usage, from the README: (require '[clj-lens.core :as lens]) (def m {:a 0, :b 1, :c [41 "Foocar"]}) (lens/get m [:c 1]) ;; => "Foocar" What happens if m is a tree with many :c keys? (fwiw i know almost nothing of lenses, altho i once tried and failed to grok the concept.) I totally agree that much more experimentation is in order. Specter is great, but it's just one of many ways of solving the problem. g -- 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.