More unification examples
?- A=parent(joe,greg),A=parent(X,Y).
X=joe, Y=greg
?- A=parent(joe,greg),A=parent(X). No
?- A=people([joe,greg]),A=people(X).
X=[joe,greg]
?- A=[1,2,3,4],A=[X,Y|Z]. X=1,Y=2,Z=[3,4]
Previous slide
Next slide
Back to first slide
View graphic version