This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-21
Channels
- # announcements (7)
- # babashka (16)
- # beginners (174)
- # biff (7)
- # calva (20)
- # cider (3)
- # clerk (6)
- # cljsrn (4)
- # clojure (98)
- # clojure-europe (57)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (15)
- # clojure-uk (7)
- # code-reviews (3)
- # cursive (23)
- # data-science (1)
- # datomic (26)
- # dev-tooling (2)
- # emacs (5)
- # figwheel-main (4)
- # fulcro (3)
- # honeysql (20)
- # hyperfiddle (20)
- # malli (8)
- # membrane (31)
- # nextjournal (5)
- # pathom (1)
- # polylith (20)
- # re-frame (14)
- # reitit (8)
- # releases (2)
- # shadow-cljs (50)
- # specter (2)
- # sql (22)
- # xtdb (5)
I'm doing a specter/select
that uses a couple of specter/collect-one
, so the general structure of my response is something like:
[[collected-val-00 collected-val-01 result-0]
[collected-val-10 collected-val-11 result-1]
...]
I wonder, could I act on each single vector? Usually I would use a specter/subselect
to gather the elements I'm interested in bundling, and a specter/view
to finalize the collection, but in this case I can't get subselect
to select each single vector. Ideas?For now, repurposing an answer by @nathanmarz in this channel, I'm using:
(specter/defrichnav view-with-collected [afn]
(specter/select* [this vals structure next-fn]
(next-fn [] (afn vals structure)))
(specter/transform* [this vals structure next-fn]
(next-fn [] (afn vals structure))))
I'm curious to know if there are more ideas, and maybe to lobby for inclusion of this function in the library➕ 2