We now illustrate how two lists unify and in what circumstances two lists fail to unify.
1. [b a d]=[d a b] fails ---as the order matters2. [X]=[b a d] fails ---the two lists are of different lengths
3. [X
Y]=[he is a cat] succeeds with
X=he Y=[is a cat]
4. [X Y
Z]=[a b c d] succeeds with
X=a Y=b Z=[c d]
5. [X
Y]=[] fails ---the empty list
can't be deconstructed
6. [X
Y]=[[a [b c]] d] succeeds with
X=[a [b c]] Y=[d]
7. [X
Y]=[a] succeeds with X=a Y=[]