Apply a function against an accumulator and each element in an array while iterating from right to left and return the accumulated result.