A.Enum.scan

You're seeing just the function scan, go back to A.Enum module for more information.

Specs

scan(t(val), (val, val -> val)) :: val when val: value()

Applies the given function to each element in the enumerable, storing the result in a list and passing it as the accumulator for the next computation. Uses the first element in the enumerable as the starting value.

Mirrors Enum.scan/2 with higher performance for Aja structures.

Link to this function

scan(enumerable, acc, fun)

View Source

Specs

scan(t(val), acc, (val, acc -> acc)) :: acc when val: value(), acc: term()

Applies the given function to each element in the enumerable, storing the result in a list and passing it as the accumulator for the next computation. Uses the given acc as the starting value.

Mirrors Enum.scan/3 with higher performance for Aja structures.