Implement min, max and sum reduction routines