Scenic.Graph.reduce

You're seeing just the function reduce, go back to Scenic.Graph module for more information.
Link to this function

reduce(graph, acc, action)

View Source

Specs

reduce(graph :: t(), acc :: any(), action :: function()) :: any()

Invokes action for each primitive in the graph with the accumulator.

Iterates over all primitives in a graph, passing each into the callback function with an accumulator. The return value of the callback is the new accumulator.

This is extremely similar in behaviour to Elixir's Enum.reduce function, except that it understands how to navigate the tree structure of a Graph.

Link to this function

reduce(graph, id, acc, action)

View Source

Specs

reduce(graph :: t(), id :: any(), acc :: any(), action :: function()) :: any()

Invokes action for each primitive that matches an id in the graph with the accumulator.

Iterates over all primitives that match a specified id, passing each into the callback function with an accumulator.

This is extremely similar in behaviour to Elixir's Enum.reduce function, except that it understands how to navigate the tree structure of a Graph.