Searching a Labeled Tree
l
findInTree(P, T) =
Root = getRoot(T),
foundInRest =
mappend((S)=>findInTree(P, S), getOffspring(T)),
P(Root) ? [Root | foundInRest] : foundInRest;
ÒEquational guardsÓ, or
Local Definitions
result