This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-18
Channels
- # announcements (9)
- # atom-editor (29)
- # aws (17)
- # babashka (72)
- # beginners (83)
- # braveandtrue (3)
- # calva (7)
- # cider (16)
- # clj-kondo (15)
- # cljs-dev (146)
- # cljsjs (1)
- # cljsrn (8)
- # clojars (1)
- # clojure (96)
- # clojure-dev (19)
- # clojure-europe (53)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (235)
- # clojuredesign-podcast (5)
- # clojurescript (81)
- # conjure (73)
- # cursive (7)
- # data-science (1)
- # datomic (5)
- # defnpodcast (8)
- # emacs (3)
- # figwheel-main (34)
- # fulcro (83)
- # graalvm (10)
- # graphql (6)
- # helix (49)
- # jackdaw (3)
- # jobs (1)
- # joker (1)
- # kaocha (1)
- # mid-cities-meetup (10)
- # off-topic (17)
- # pathom (16)
- # re-frame (11)
- # reagent (18)
- # reitit (18)
- # remote-jobs (4)
- # shadow-cljs (63)
- # spacemacs (18)
- # specter (20)
- # sql (17)
- # uncomplicate (1)
- # vim (28)
- # xtdb (32)
Hi a simple question but one that I have struggled to find an answer: I have a vector of maps and I want to return all the maps that contains a map entry that matches a particular value, for example all maps where :lang contains "EN".
@nathanmarz I'm having an interesting issue combining transform
and stay-then-continue
. I'm replacing a map with a string via transform, and then specter seems to try to navigate the new value like it's still a map and I get class java.lang.String cannot be cast to class clojure.lang.Associative
from do-keypath-transform
. Does that sound familiar at all?
how do you want to transform the map if you've already stringified its contents? do you have a more complete toy example?
There is another step to this: I have a vector of pairs of vectors. I want to add a value to the first vector based on a property in the second vector. Again a simple use case, and probably has a simple answer
@spieden thanks, I was expecting to be able to pass the first vector to the transform function without having selected it based on the values in the second function.
Ah hrm, well you can pass the whole tuple to the transform based on a value in the second
@nathanmarz Looks like switching to postorder via continue-then-stay
did the trick!