This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-12
Channels
- # arachne (1)
- # aws (2)
- # beginners (123)
- # boot (22)
- # boot-dev (8)
- # chestnut (3)
- # cider (38)
- # clara (36)
- # cljs-dev (148)
- # clojars (2)
- # clojure (76)
- # clojure-austin (2)
- # clojure-greece (1)
- # clojure-italy (6)
- # clojure-russia (5)
- # clojure-spec (8)
- # clojure-uk (65)
- # clojurescript (45)
- # core-async (38)
- # cursive (9)
- # data-science (5)
- # datomic (28)
- # docs (1)
- # emacs (2)
- # fulcro (34)
- # hoplon (18)
- # jobs-discuss (7)
- # keechma (8)
- # lumo (5)
- # om (3)
- # onyx (31)
- # parinfer (1)
- # pedestal (1)
- # re-frame (20)
- # reagent (5)
- # ring-swagger (16)
- # shadow-cljs (56)
- # spacemacs (11)
- # specter (8)
- # sql (5)
- # unrepl (29)
- # yada (6)
@nathanmarz Yes I have been using the collect twins with select which constructs a seq. I will take a look at the example.
is there a way to make transform
halt after the first successful navigation, something like transform-one
?
I’m thinking about this case:
user=> (def a [{:name "foo" :id 1} {:name "bar" :id 2}])
#'user/a
user=> (transform [ALL (selected? :id (pred= 2))] #(assoc % :name "not-foo") a)
[{:id 1 :name "foo"} {:id 2 :name "not-foo"}]
since ids are unique, there will only be one element selected so there is no need to check the rest of the elements once it has been found
@schmee no, nothing like that currently
this idea might be applicable to that kind of behavior: https://github.com/nathanmarz/specter/issues/121