Scenic.Graph.map

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

Specs

map(graph :: t(), action :: function()) :: t()

Map all primitives in a graph into a new graph.

Crawls through the entire graph, passing each primitive to the callback function. The result of the callback replaces that primitive in the graph. The updated graph is returned.

Specs

map(graph :: t(), id :: any(), action :: function()) :: t()

Map all primitives in a graph that match a specified id into a new graph.

Crawls through the entire graph, passing each primitive to the callback function. The result of the callback replaces that primitive in the graph. The updated graph is returned.

This is so similar to the modify function that it may be deprecated in the future. For now I recommend you use Graph.modify/3 instead of this.