| Did you know ... | Search Documentation: | 
|  | Predicate sub_term_shared_variables/3 | 
 [det]sub_term_shared_variables(+Sub, 
+Term, -Vars)
[det]sub_term_shared_variables(+Sub, 
+Term, -Vars)An example use-case is refactoring a large clause body by introducing intermediate predicates. This predicate can be used to find the arguments that must be passed to the new predicate.