How to Iterate over Map Keys and Values in Clojure?
That’s expected behavior. (doseq [x … y …]) will iterate over every item in y for every item in x. Instead, you should iterate over the map itself once. (seq some-map) will return a list of two-item vectors, one for each key/value pair in the map. (Really they’re clojure.lang.MapEntry, but behave like 2-item vectors.) user> … Read more