This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-30
Channels
- # aws (5)
- # aws-lambda (2)
- # beginners (29)
- # boot (5)
- # cider (3)
- # cljs-dev (3)
- # cljsjs (2)
- # clojure (112)
- # clojure-austin (1)
- # clojure-brasil (2)
- # clojure-italy (9)
- # clojure-nl (2)
- # clojure-russia (5)
- # clojure-spec (49)
- # clojure-uk (41)
- # clojurescript (157)
- # core-logic (5)
- # crypto (1)
- # cursive (12)
- # data-science (38)
- # datomic (31)
- # emacs (3)
- # events (2)
- # garden (3)
- # graphql (10)
- # immutant (4)
- # jobs (3)
- # juxt (5)
- # klipse (1)
- # luminus (3)
- # off-topic (40)
- # om (1)
- # onyx (39)
- # other-languages (7)
- # protorepl (3)
- # re-frame (40)
- # reagent (60)
- # ring (8)
- # ring-swagger (14)
- # shadow-cljs (159)
- # spacemacs (1)
- # specter (6)
- # uncomplicate (3)
- # yada (2)
hi i’ve got a quick path/select question. In the following code
(def testdata {:a
{:b [{:c :d}
{:e :f}
{:g :h}]}})
I’d like to select out :f
based on the fact that I know the {:e :f}
map’s index
I get this far (s/select [:a :b (s/srange 1 2)] testdata)
But can’t figure out what to add to the rest of the path@eoliphant use (nthpath 1)
@eoliphant worth skimming through this page to see all the navigators that come with specter https://github.com/nathanmarz/specter/wiki/List-of-Navigators
hi @nathanmarz yeah re-read them after your help on that one. I’d skimmed them before I started coding and really ‘got it’ lol. Really great tool. I’ve used lenses in Scala, which cover some of what Specter does. Clojure just makes everything better lol. Specter is a much needed bit of special sauce, I’m working on a pretty complex dynamic forms app, that needs a lot of deep structure querying/manipulation, spent the past 2 days ripping out all of my existing code for use cases that Specter covers
@eoliphant great to hear