Fork me on GitHub
#specter
<
2016-08-21
>
amacdougall15:08:01

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?

nathanmarz15:08:19

(transform [(keypath 2) (keypath 4)] ...)

amacdougall15:08:22

...oh, that makes perfect sense. I saw "key" and my brain jumped to "keyword".

amacdougall15:08:19

Worked like a charm!