Fork me on GitHub
#specter
<
2018-06-20
>
montanonic22:06:34

Any one-liner that can "explode" values while keeping things flat? Roughly speaking, like flatmap. Example: turning {:a 1 :b 2} into {:a 1 :b 2 "a" 1 "b" 2 'a 1 'b 2}, the keys get mapped to a set of new keys, but retain their original values, and the whole is returned as a single flat map.

montanonic22:06:42

https://github.com/nathanmarz/specter/issues/82#issuecomment-215098107 is close, but not structure-preserving, and passes the arguments inside of an additional vector (which is fine but ideally should be left an implementation detail).