title: Prolog how do I append a list of lists into one list?
body: <p>So I'm totally new to Prolog and need some help. I'm trying to take a list of lists like <code>[[1,2,3],[4,5,6],[7,8]]</code> and create a list like <code>[2,3,5,6,8]</code>, so basically all the values into a new list besides the first of each list. I got this:</p>
  
  <pre><code>test5(X,[[_|X]|_]).
  test5(X,[_|A]) :- test5(X,A).
  </code></pre>
  
  <p>which returns <code>[2,3]</code> and then <code>[5,6]</code> and then <code>[8]</code> each time I press enter. I'm not sure how to make them run all at once and make them into a list. I tried using append in different ways but I could not get this working. Any idea on how to implement this? Thanks!</p>