Another predicate that can come handy is subsumes_term/2, notably for verifying complex terms such as error terms where you typically only want to make sure part of the structure has a given shape and do not care about e.g., the second argument of the error(Formal,Context)
term. In most cases =@= (variant) has my preference or == if the output should contain some specific variable.
5 Likes