sum can take parameters of different types.