@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
I don’t know if that makes any sense 😄
@schmee no, nothing like that currently
this idea might be applicable to that kind of behavior: https://github.com/nathanmarz/specter/issues/121
yeah that seems to be it, I’ll keep an eye on that issue :thumbsup: