Какую функцию я могу поставить как FOO здесь, чтобы дать true в конце? Я играл с хэш-множеством (только правильно для первых 2 значений), conj и concat, но я знаю, что я не обрабатываю одноэлементное условие установки с любым из них.
(defn mergeMatches [propertyMapList]
"Take a list of maps and merges them combining values into a set"
(reduce #(merge-with FOO %1 %2) {} propertyMapList))
(def in
(list
{:a 1}
{:a 2}
{:a 3}
{:b 4}
{:b 5}
{:b 6} ))
(def out
{ :a #{ 1 2 3}
:b #{ 4 5 6} })
; this should return true
(= (mergeMatches in) out)
Каков самый идиоматический способ справиться с этим?