Seems pretty idiomatic to me. One thing I noticed is you could probably use (reduce +)
in place of (reduce #(map + %1 %2))
I want (reduce #(map + % %2) [[1 2] [1 2] [3 5] [2 6]])
(reduce + [[1 2] [1 2] [3 5] [2 6]])
doesn't work here.
...and I have a hunch that you could find something a little simpler than (filter #(apply = %))
, though I can't think of it offhand. (Using apply
like this is a faint code smell to me personally, though it certainly has its place)
Thanks a lot for your insights.