Implement #sum, #average, #maximum and #minimum