Sourceror.Zipper.traverse

You're seeing just the function traverse, go back to Sourceror.Zipper module for more information.

Specs

traverse(zipper(), (zipper() -> zipper())) :: zipper()

Traverses the tree in depth-first pre-order calling the given function for each node. Returns a zipper to the root node.

The function must return a zipper.

Link to this function

traverse(zipper, acc, fun)

View Source

Specs

traverse(zipper(), term(), (zipper(), term() -> {zipper(), term()})) ::
  {zipper(), term()}

Traverses the tree in depth-first pre-order calling the given function for each node with an accumulator. Returns a zipper to the root node and the accumulator.