Unification is implicitin rule application
/* simple rule: X is the same as X. */
identity(X,X).
?- identity( p(X,foo), p(bar,Y) ).
X=bar, Y=foo
/* could have written the rule as: */
identity(X,Y) :- X = Y.
Previous slide
Next slide
Back to first slide
View graphic version