This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-08
Channels
- # asami (15)
- # babashka (123)
- # beginners (174)
- # calva (4)
- # cider (6)
- # cljdoc (4)
- # cljs-dev (4)
- # cljsrn (18)
- # clojure (268)
- # clojure-australia (1)
- # clojure-europe (107)
- # clojure-ireland (5)
- # clojure-nl (2)
- # clojure-uk (18)
- # clojured (1)
- # clojurescript (21)
- # conjure (4)
- # cursive (38)
- # data-science (1)
- # datahike (6)
- # datomic (4)
- # events (1)
- # fulcro (9)
- # graalvm (16)
- # helix (6)
- # honeysql (4)
- # instaparse (3)
- # jobs (1)
- # observability (15)
- # pathom (7)
- # pedestal (15)
- # polylith (9)
- # practicalli (1)
- # re-frame (6)
- # remote-jobs (2)
- # specter (7)
- # sql (16)
- # tools-deps (1)
- # vim (5)
- # xtdb (1)
transformed
is, I think, the simplest way to do that
I'd love to be wrong though
I tried to do it the other way around, start navigating from :members
and then use selected?
but I don't think that works.
I have settled for calling select
twice in this case because I find the transformed
approach a little harder to parse
I mean, compare your transformed
solution to this:
(def structure
{:guild {:a {:members ["1234" "1235"]}
:b {:members ["2345"]}}
:members {"1234" 1
"2345" 2
"1235" 3}})
(select [:members (submap
(select [:guild :a :members ALL] structure))]
structure)
;; => [{"1234" 1, "1235" 3}]
That makes sense. It just would be nice imo to be able to get those keys from the collected values in a navigator rather than having to make a second select operation.