title: how can I print items in a list one by one
body: <p>I have my answers in a list by findall and the list is called answers.
  Now answers can have 0 , 1 or more items.</p>
  
  <p>0 answer I can solve with display_answers([]).</p>
  
  <p>1 answer I can solve with display_answer ([X]).</p>
  
  <p>Can I do more then 1 display_answer([X|X]) and then use foreach to print all the answers ?
  Or is there a better way ?</p>
  
  <p>Roelof</p>
  
  <p>Edit1 : 
  I tried this:</p>
  
  <pre><code>% Displays the output of siblings(X,Y) and takes care that 
  % there are no duplicates.
  display_siblings(Person) :-
       findall(Person-Y, siblings(Person,Y), Sibs),
       display_the_siblings(Sibs).
  
  % Display a message if there are no siblings found. 
  display_the_siblings([]) :-
         write('Er zijn geen zussen/broers bekend').  
  
  % Displays a message if one sibling is found.
  display_the_siblings([X-Y]) :-
          write('The enigste broer of zuster is '),
          write(Y).
  
  % Display a message if there are more then 1 siblings found.
  display_the_siblings([[X-Y|X-Y]) :-
          write('Alle zusterparen zijn : \n'),
  </code></pre>
  
  <p>But if I use recursion then when Sibs is one then the wrong predicate is used. 
  So the question is still what do I take as parameters to make the last predicate work. </p>