Wto_utils.MakeSourcemap f wto applies f to every element of wto while conserving the w.t.o. structure. The second argument of f is true if the argument of f is a head.
iter f wto applies f to every element of wto. The second argument of f is true if the argument of f is a head.
head_of wto h n returns whether n is inside the component of head h. h must be a head. Returns true also if n = h. Complexity: linear in the number of nodes.
Maximum number of heads among all nodes, i.e. maximum number of nested components.