finalResult()
The finalResult() method transforms the state variables into the final result.
After the merge phase completes, there is a single set of state variables for each group of data. That set of state variables will be passed into the finalResult() method, which transforms the state variables into the final result.
Example
function finalResult(state)
return state[1] / state[2]
end