Делайте это шаг за шагом:
Используя sort-by
+ partition-by
...
(->> [[1917 2850]
[1623 34]
[1917 300]]
;; sort by first element
(sort-by first)
;; split when first element changes
(partition-by (comp identity first))
;; for each partition, take first element of first row
;; as key, and sum up second element of each row as value
(mapv (fn [xs]
[(ffirst xs)
(apply + (map second xs))])))
;; => [[1623 34]
;; [1917 3150]]
... или используйте group-by
(->> [[1917 2850]
[1623 34]
[1917 300]]
;; group by first element
(group-by first)
;; for each group, take the group key
;; and sum up second element of each row in the group
(mapv (fn [[g xs]]
[g (apply + (map second xs))])))