title: scala: what means this line in tail recursive function?
body: <p>I have this tail recursive function which should get two lists and append them in a third list.</p>
  
  <pre><code>def append[T](as:List[T], bs:List[T]) : List[T] =
  {
    def append_tailrec[T](as:List[T], bs:List[T], acc:List[T]) : List[T] =
    {
      as match
      {
        case x::xs =&gt; append_tailrec(xs, bs, x::acc);
        case (x::xs &amp;&amp; as == Nil) =&gt; append_tailrec(as, xs, x::acc);
        case (bs == Nil) =&gt; acc;
      }
    }
    append_tailrec(as, bs, ?::?);
  }
  </code></pre>
  
  <p>I do not understand the last line in any tailrecursive function like this one which is here <code>append_tailrec(as, bs, ?::?)</code> Is this for initialization purpose? I think I also heard that it is the last (recursive) call before finishing. Anyway, could someone explain this line to me in detail? Please don't give me hints how to write this function in another way. I just want to understand what the purpose of this line is and what I have to give here (where the question marks are). THX in advance!</p>