find_path : (term -> bool) -> term -> string
- SYNOPSIS
-
Returns a path to some subterm satisfying a predicate.
- DESCRIPTION
-
The call find_path p t traverses the term t top-down until it finds a
subterm satisfying the predicate p. It then returns a path indicating how to
reach it; this is just a string with each character interpreted as:
- "b": take the body of an abstraction
- "l": take the left (rator) path in an application
- "r": take the right (rand) path in an application
- FAILURE CONDITIONS
-
Fails if there is no subterm satisfying p.
- EXAMPLE
-
# find_path is_list `!x. ~(x = []) ==> CONS (HD x) (TL x) = x`;;
Warning: inventing type variables
val it : string = "rblrrr"
- SEE ALSO
-
follow_path, PATH_CONV.