| Paste number 113394: | ensure coll before merging with concat |
| Pasted by: | scottj |
| When: | 1 year, 9 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+2FHU |
| Channel: | None |
| Paste contents: |
(let [ensure-coll #(if (coll? %) % (vector %))]
(merge-with #(apply concat (map ensure-coll %&))
{:a 1} {:a [2]} {:a [3] :b 1}))
; returns {:b 1, :a (1 2 3)}This paste has no annotations.