I have a set of numbers like this
s = {a, b, c, d, e, f, ..., g, h}
and I would like to ask Mathematica to do the following operation (to sum the subtractions of adjacent numbers)
(a - b) + (c - d) + (e - f) + ... + (g - h)
Is it possible to do that?
s[[;; ;; 2]] - s[[2 ;; ;; 2]] // Total
? Assumes the length is even $\endgroup$