i've discovered a new way to make a clojure project incompatible with windows (check in a file whose path contains backslashes)
I have a data structure that looks like this:
[{:tags [:a :b :c] :name "x"} {:tags [:b] :name "y"}]
I want to transform this into the following map:
{:a [{:name "x"}] :b [{:name "x"} {:name "y"}] :c [{:name "x"}]}
I thought about doing this with group-by, but that generates keys that are lists, it doesn't flatten the list. Is there a simple way to do this? am I missing something?this seems to work ok
(defn flat-group-by-tags [items]
(apply merge-with into
(for [{:keys [tags] :as m} items
tag tags]
{tag [m]})))Hey guys, I want to build a kafka producer/consumer and was wondering is there a defacto Kafka library for Clojure? Or should I just use the Java Interop, and the Java library? thanks!
A previous discussion on the topic: https://clojurians.slack.com/archives/C03S1KBA2/p1738662214740899