A visitor function that is called for each element in the envelope.
The visitor function takes the following parameters:
envelope
level
incomingEdge
state
The visitor returns a tuple of:
This enables accumulating state or passing context during traversal.
A visitor function that is called for each element in the envelope.
The visitor function takes the following parameters:
envelope: The current envelope element being visitedlevel: The depth level in the hierarchy (0 for root)incomingEdge: The type of edge connecting this element to its parentstate: Optional context passed down from the parent's visitor callThe visitor returns a tuple of:
This enables accumulating state or passing context during traversal.