Overview of Reducers in lfi
A reducer defines how to combine a lazy collection of values into a single final value, either synchronously or asynchronously. The in-progress final value during this process is called the "accumulator".
In the lfi library, functions starting with to (e.g., toArray, toSum) are typically reducers. Sync reducers can be used with reduce, reduceAsync, and reduceConcur, while async reducers are used with reduceAsync and reduceConcur.