title: How to Use append in recursion
body: <p>I am building a program and I need advice on this piece of code:</p>
  
  <pre><code>skyff([H1|Ta],L1,L2,):-
      skyff(Ta,L1,L22),
      append(H1,L2,L22).
  </code></pre>
  
  <p>To be more specific - what I want to accomplish is to append H1 to the List L2 and make a recursive call (skyff(Ta,L1,L22) ) where L22 is the result of appending H1 to L2. But I am unsure of if I am doing it right? - I didn't paste the code for the entire program since it is only this specific passage I am a bit uncertain of.</p>
  
  <p>Maybe it should be the other way around:</p>
  
  <pre><code>skyff([H1|Ta],L1,L2,):-
          append(H1,L2,L22),
          skyff(Ta,L1,L22).
  </code></pre>