title: about the formal parameters of the String call to the foldRight function in Scala? Why (Nil: List[A])?
body: <p><a href="https://i.stack.imgur.com/gj3jd.png" rel="nofollow noreferrer">doubt code about string call foldRight</a></p>
  <p>Is the formal parameter of this code a shorthand?</p>
  <pre class="lang-scala prettyprint-override"><code>val list = &quot;abc&quot;.foldRight(Nil: List[Int])((x, acc) =&gt; x :: acc)
  </code></pre>
  <p>If so, I understand</p>
  <pre class="lang-scala prettyprint-override"><code>val nilList: List[Int] = Nil
      val list = &quot;abc&quot;.foldRight(nilList) { (x, acc) =&gt; x :: acc  }
  </code></pre>