title: Prolog Beginner: Trivial Example that I cannot get to work.
body: <p>I have some prolog.  The lessThanTen and example predicates work as expected however the exam predicate does not work.  </p>
  
  <pre><code>lessThanTen(9).
  lessThanTen(8).
  lessThanTen(7).
  lessThanTen(6).
  lessThanTen(5).
  lessThanTen(4).
  lessThanTen(3).
  lessThanTen(2).
  lessThanTen(1).
  lessThanTen(0).
  
  % This should always return 5.
  example(X) :-
          X is 5.
  
  % This should return all values that are less than ten.
  exam(X) :-
          X is lessThanTen(Y).
  </code></pre>
  
  <p>Here is the output: </p>
  
  <pre><code>% swipl
  ...
  
  ?- [addv1]. 
  Warning: /.../addv1.pl:17:
          Singleton variables: [Y]
  % addv1 compiled 0.00 sec, 1,484 bytes
  true.
  
  ?- lessThanTen(X).
  X = 9 ;
  X = 8 ;
  X = 7 ;
  ...
  
  ?- example(X).
  X = 5.
  
  ?- exam(X).
  ERROR: is/2: Arithmetic: `lessThanTen/1' is not a function
  ?- exam(5).
  ERROR: is/2: Arithmetic: `lessThanTen/1' is not a function
  </code></pre>
  
  <p>I am thinking that the warning I am getting is pretty key.</p>