This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-29
Channels
- # aws (6)
- # beginners (33)
- # bitcoin (2)
- # boot (22)
- # carry (2)
- # cider (5)
- # clara (21)
- # cljs-dev (115)
- # cljsrn (40)
- # clojure (161)
- # clojure-dev (73)
- # clojure-italy (38)
- # clojure-russia (88)
- # clojure-spec (123)
- # clojure-uk (58)
- # clojurescript (88)
- # core-async (26)
- # cursive (5)
- # datascript (18)
- # datomic (26)
- # hoplon (50)
- # java (2)
- # jobs (1)
- # leiningen (10)
- # lumo (1)
- # off-topic (18)
- # om (9)
- # onyx (26)
- # parinfer (13)
- # pedestal (41)
- # quil (1)
- # re-frame (27)
- # reagent (21)
- # ring-swagger (11)
- # slack-help (3)
- # spacemacs (8)
- # specter (5)
- # sql (42)
- # timbre (1)
- # uncomplicate (7)
- # untangled (3)
- # videos (1)
- # yada (26)
Hello … I’m wondering if I’m missing an obvious way to do sorting and/or selecting minimum/maximum values with Specter? I think I could do it with view
or transformed
and a function that takes the whole array and just does the min/max in Clojure, but is there a more Specter-y (spectral?) way?
Hmm, it looks like view
or transformed
will not do what I want because the provided functions get applied to each value matching my ALL
selector, rather than the sequence of matching values.
@enn if it's not already sorted in your data structure, you would need to do (view sort)
if the values are spread throughout your data structure (not together in a sequence), you can first do (subselect <path>)
to manipulate them as a single sequence
@nathanmarz aha, thank you, I will look at subselect