title: Removing heads from lists in Prolog
body: <p>I'm trying to write a predicate to remove the head from every list in list of lists and add the tails to a new list. The resulting list should be returned as the second parameter.</p>
  
  <p>Here's the attempt:</p>
  
  <pre><code>construct_new(S,New) :-
      New = [],
      new_situation(S,New).
  
  new_situation([],_).
  new_situation([H|T], New) :-
      chop(H, H1),
      new_situation(T, [H1|New]).
  
  chop([_|T], T).
  </code></pre>
  
  <p>You would call it like this:</p>
  
  <pre><code>construct_new([[x,x],[b,c],[d,e,f]],S).
  </code></pre>
  
  <p>This, however, only produces output <code>true.</code>.</p>