modify

Generic ParseTree modifier: predicate must be callable with a ParseTree and return a boolean. modifier must be callable with a ParseTree and return a ParseTree.

If predicate is true on input, modify calls modifier on input and return the result. If not, it continues with the children.

modify
(
alias predicate
alias modifier
)

Meta