Tree fold
= Tree fold
{title2=`foldTree :: (b -> a -> b -> b) -> b -> Tree a -> b`}
A <structural recursion> replacing the empty binary tree by a value and a nonempty node by a combining function on its two folded children and root label. The result type may itself be a <function type>, allowing a fold to construct a membership <predicate> or a <difference list> rather than traversing all branches for every subsequent query.