Cédric Soulas
Motion graphics about programming


Episode 25 - Operators and functions - Part 2 Monday, 5 Mar.

Last Monday, in Part 1, you’ve learned:

Accumulate values

Today we focus on functions used as accumulator functions.

A function that:

may be used as an accumulator function with the scan and reduce operators. In this case, value 1 and new value are often called “accumulation” or “acc”.

Despite the names accumulator and accumulation, accumulator functions don’t store the result “for later use”. The operators do save the result. They will eventually give it back to their accumulator function. This is why accumulator functions need to take an accumulation as an argument.

ord wword

This function has no memory

Ignore the value

Even if a function is used as an accumulator function, it doesn’t have to “accumulate” the two input values. It can ignore the second argument:

count valuecount + 1

This function only increments the
accumulation count


Cards to learn Reactive Programming

Focus on one new concept – every Monday

Occasional updates, plus:
Cédric Soulas
Motion graphics about programming