The new language tools for processing trees based on nodes enumerators and determinants of the depth-first traversal are proposed. Node enumerators define a tree slice and set the directions and step of its breadth-first traversal: from left to right or from right to left, from root to crown or vice versa. The arguments of the nodes enumerators are the arithmetic series of their coordinates in the tree. The traversal determinants specify a way to recursively perform a depth-first traverse. The arguments of the determinants of the recursive depth-first traversal are the aliases of nodes and the ranks of references to their successors. The second-order functions and the recursive comprehension operators over trees similar to list comprehension operators are introduced. Using these tools allows for concisely expressing the operators to building and processing trees/slice without explicitly using recursion.
No takes yet. Share an insight, caveat, or question.
Vladimir Markov (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: