Execute a provided function for the segments of a poly line approximating the path.
a Path
a function to call for each node in the path.
user data to pass to a node.