title: Unification in Prolog
body: <p>This is a question from a past exam about unification in Prolog.
  we were supposed to say if they unified and then the instantiations. </p>
  
  <pre><code>f(a,g(b,a)) and f(X,g(Y,X))
  </code></pre>
  
  <p>This unifies quite a = X, g(b,a) = g(Y,X) and is quite straight forward</p>
  
  <pre><code>f(g(Y),h(c,d)) and f(X,h(W,d)) 
  </code></pre>
  
  <p>I dont think this one unifies because of g(Y) =/ X, though h(c,d) does  unify with h(W,d). Though is it possible that X = g(Y) since uppercase X looks until it finds a solution? </p>