tree_level

one of the documented procedures in this installation of the ACS
Usage:
tree_level   tree   n   { result "" }
What it does:
returns the n-th level of a tree (where 0 is the root tree) as a list of trees
Defined in: /web/philip/tcl/ad-trees.tcl

Source code:


    if { [empty_string_p $tree] } { return $result }
    if { $n==0 } {
	lappend result $tree
    } else {
	foreach subtree [tail $tree] {
	    set result [tree_level $subtree [expr $n-1] $result]
	}
    }
    return $result


philg@mit.edu