Search code examples
syntaxprolog

Unifiable Prolog Terms


Are the two terms [a,b,c,d,e] and [[X] | [b,c,d,e]] unifiable? I need confirmation I think they are not because you cannot get [X] = a in any way?


Solution

  • I think you need to unify with [X | [b,c,d,e]], not [[X] | [b,c,d,e]], i.e. you can get X=a, not [X]=a.