...

/

The reduce Function

The reduce Function

Learn about the reduce function in the Flow module.

Introduction

In addition to map and filter, the reduce function in the Enum module is another frequently used tool when working with data. It is also the backbone of other functions in this module, including group_by, uniq_by, and take_sort. This section shows how to use Flow.reduce/3 ...