This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-11
Channels
- # admin-announcements (1)
- # aws (2)
- # beginners (32)
- # boot (147)
- # capetown (1)
- # cider (11)
- # cljs-dev (45)
- # cljsrn (57)
- # clojure (187)
- # clojure-russia (5)
- # clojure-spec (97)
- # clojure-uk (33)
- # clojurescript (33)
- # cloverage (17)
- # clr (4)
- # conf-proposals (93)
- # core-async (6)
- # cursive (9)
- # data-science (1)
- # datomic (24)
- # defnpodcast (1)
- # devcards (3)
- # emacs (3)
- # hoplon (95)
- # jobs (1)
- # off-topic (7)
- # om (97)
- # onyx (32)
- # overtone (1)
- # parinfer (4)
- # pedestal (1)
- # proton (1)
- # protorepl (13)
- # re-frame (4)
- # reagent (10)
- # specter (14)
- # untangled (40)
@nathanmarz: cool, thank you!
nice challenge for specter: http://stackoverflow.com/questions/38893968/how-to-select-keys-in-nested-maps-in-clojure
Ah, the question is even different than I understood it. I thought he wanted {:a 1, :b 2, :c {:d 3}}
leaving the structure intact
@borkdude: submap
is the specter analogue to select-keys
(into {} (traverse (multi-path (submap [:a :b]) [:c (submap [:d])]) {:a 1 :b 2 :c {:d 3}}))
could make a function that converts [:a :b [:c :d]]
to that path
a better way is to capture the idea of "nested submaps" as a navigator
(into {} (traverse (nested-submaps :a :b [:c :d]) m))