title: Calling facts in query
body: <p>This is my code:</p>
  
  <pre><code>sentence([['o'],['m','e','n','i','n','o'],['a','l','e','g','r','e']]).
  
  lastWord(X,[X]).
  lastWord(X,[_|Z]) :- lastWord(X,Z).
  </code></pre>
  
  <p>If I try <code>lastWord(X,[1,2,3]).</code> or even <code>lastWord(X,[['o'],['m','e','n','i','n','o'],['a','l','e','g','r','e']]).</code> I get what I want (which is, of course, the last element of the list (in the examples, <code>3</code> and <code>['a','l','e','g','r','e']</code>.</p>
  
  <p>But if I try <code>lastWord(X, sentence).</code> or <code>lastWord(X, sentence(Y)).</code> I get <code>false</code>.</p>
  
  <p>How can I "call" the defined list (in this case, 'sentence') in lastWord?</p>