This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-21
Channels
- # admin-announcements (1)
- # beginners (3)
- # boot (242)
- # clara (1)
- # cljsrn (8)
- # clojars (2)
- # clojure (68)
- # clojure-russia (23)
- # clojure-spec (28)
- # clojure-uk (11)
- # clojurescript (7)
- # datavis (3)
- # datomic (21)
- # emacs (2)
- # events (2)
- # hoplon (56)
- # jobs (3)
- # lambdaisland (1)
- # mount (20)
- # off-topic (4)
- # om (13)
- # onyx (17)
- # other-languages (2)
- # parinfer (7)
- # proto-repl (2)
- # proton (2)
- # protorepl (53)
- # re-frame (13)
- # reagent (3)
- # ring-swagger (22)
- # specter (5)
I'm working with a multidimensional array, and couldn't quite figure out how to drill into a single grid cell by index without an awkward (srange n (inc n))
. I ended up using (update-in y x <cell-specific keys...> <fn>)
, but if I want to do anything more complex, that will break down. Am I missing an easy way to select something out of a vector by index?
@amacdougall use keypath
(transform [(keypath 2) (keypath 4)] ...)
...oh, that makes perfect sense. I saw "key" and my brain jumped to "keyword".
Worked like a charm!