title: Query for facts from list
body: <p>I am new to prolog and i want to solve this problem. Suppose I have a list say<br>
  <code>List</code> i.e.    <code>[a,b,c]</code><br>
  now i have some facts say<br>
  <code>likes(a,banana).<br>
  likes(b,orange).<br>
  likes(c,apple).<br>
  likes(d,grapes).</code></p>
  
  <hr>
  
  <p>So if I make a query  </p>
  
  <p><code>?- my_functor(List,X).<br>
  X=[banana,orange,apple].</code>  </p>
  
  <hr>
  
  <p>Thanks you.</p>