tree_map func tree
applies a function to each element of a tree
Source code:
set root [eval_unary $func [head $tree]] set subtrees [map "tree_map $func" [tail $tree]] cons $root $subtrees