This operation is based on the Uniplate
universe function.
Given a list of trees, it returns those trees, and all the children
trees at any level. For example:
universeTree
[TagBranch "a" [("href","url")] [TagBranch "b" [] [TagLeaf (TagText "text")]]]
== [TagBranch "a" [("href","url")] [TagBranch "b" [] [TagLeaf (TagText "text")]]]
,TagBranch "b" [] [TagLeaf (TagText "text")]]
This operation is particularly useful for queries. To collect all
"a" tags in a tree, simply do:
[x | x@(TagBranch "a" _ _) <- universeTree tree]