This function iterates over every element of the array and calls the closure to work on that element.
It will reduce the array to a single value, from the right to the left, and return it.