fix type parameter of operate in Grouped.reduce