say i have a set of vectors (in hiccup):
[[:a "hello"] [:a "cruel"] [:a "world"]]
what's the clojurey/FP way of inserting a new value between each element?
[[:a "hello"] :space [:a "cruel"] :space [:a "world"]]
in an imperative context, i would probably have some janky stuff with a counter inside an iterator.
i imagine i could use split-at with for , but that feels a lot less elegant than it should be
interpose could do it
user=> (into [] (interpose :space) [[:a "hello"] [:a "cruel"] [:a "world"]])
[[:a "hello"] :space [:a "cruel"] :space [:a "world"]]ah thank you! slipped straight past my googling