Fork me on GitHub
#specter
<
2016-09-20
>
puzzler21:09:04

Which is more idiomatic to conj something into a set inside some other stuff : (setval [path1 path2 (subset #{})] #{:a} data) or (transform [path1 path2] #(conj % :a) data)?

puzzler21:09:36

And is there a meaningful perf difference between the two?

nathanmarz21:09:23

@puzzler the latter will be faster but the former works better with nil

nathanmarz21:09:52

I've considered making navigators that go to "void" elements of specific type, like VOID-SET-ELEM

nathanmarz21:09:11

if the transform results in NONE, it wouldn't conj, otherwise it would conj