Term_expansion/2 vs goal_expansion/2

term_expansion/2 is the original … it takes an entire fact or clause and expands it.

goal_expansion/2 came later, to handle a common case when you want to expand individual goals (in the body of a clause) without having to deal with all control stuff ((,)/2, (;)/2, (->)/2, (+)/1, etc.).

6 Likes