The reduce function can be used to sum the elements in a list.
(reduce '+ '(1 2 3 4))
;;=> 10
By default, reduce performs a left-associative reduction, meaning that the sum 10 is computed as
(+ (+ (+ 1 2) 3) 4)
The first two elements are summed first, and then that result (3) is added to...