find_terms : (term -> bool) -> term -> term list
Searches a term for all subterms that satisfy a predicate.
A list of subterms of a given term that satisfy the predicate is returned.
- FAILURE CONDITIONS
This is a simple example:
while the following shows that the terms returned may overlap or
contain each other:
# find_terms is_var `x + y + z`;;
val it : term list = [`z`; `y`; `x`]
# find_terms is_comb `x + y + z`;;
val it : term list = [`(+) y`; `y + z`; `(+) x`; `x + y + z`]
- SEE ALSO