Aggregating values using the Stream paradigm