I have a list of maps where each key is associated with a list of strings.
I would like to convert each of these string list to sets instead.
(def list-of-maps-of-lists '({:a ["abc"]} {:a ["abc"]} {:a ["def"]} {:x ["xyz"]} {:x ["xx"]}))
This is my best attempt so far:
(flatten (map (fn [amap] (for [[k v] amap] {k (set v)})) list-of-maps-of-lists))
=> ({:a #{"abc"}} {:a #{"abc"}} {:a #{"def"}} {:x #{"xyz"}} {:x #{"xx"}})
What is the idiomatic solution to this problem?