Darwin Help

Back to Index

Prefix

Iterator Prefix - walks over all the nodes of a tree in prefix order

Calling Sequence  for n in Prefix(tree) do ... od;
Parameters
NameTypeDescription

tree Treea general tree
Return Type  Tree
Synopsis This is an iterator which returns all the nodes (internal nodes of type "Tree" or external nodes of type "Leaf") of a tree in prefix order. Prefix order means that the node is visited first, then the left subtree, then the right subtree, for every node recursively.
See also Infix,   iterate,   iterator,   Leaf,   Leaves,   objectorientation,   Postfix