Matrix Diagonal Difference
Could you have avoided get-diagonal-sums-reducer?

You probably could have used partial if you wanted, though I'm not sure it ends up that much better:

(defn diagnoal-sums-reducer [n sums [line-number line]]
  ...)

(reduce (partial diagonal-sums-reducer n) ...)


Is there a much less verbose way to do this.

I think there is.  I can see why you've tried to use reduce, but your reducer is doing way more than it should be.  Essentially, there's 3 things it's doing:


Calculating the coordinates of the  diagonals for the line.
Getting the values of those coordinates.
Summing the values together with the previous values.


There might be some situations where you'd need to do all of those things in a single reduce, but I don't think this is one of those cases.  It's also complicated by having to do this for both the primary and the secondary cases.

It ends up much simpler if you split the whole process out into the individual steps:

(defn sum [x] (apply + x))

(let [n 3
      matrix [[11 2 4]
              [4 5 6]
              [10 8 -12]]

      ;; Build up a list of coordinates for the diagonals.
      primary-coords (for [i (range n)] [i i])
      secondary-coords (for [i (range n)] [(- n i 1) i])

      ;; Extract the values of those coordinates
      primaries (map #(get-in matrix %) primary-coords)
      secondaries (map #(get-in matrix %) secondary-coords)]

    ;; Sum them, take the absolute difference
    (Math/abs (- (sum primaries) (sum secondaries))))