title: Scala <console>:1: error: ';' expected but '(' found
body: <p>I keep getting this error when writing a simple recursive function in Scala. What am I missing?</p>
  
  <pre><code>scala&gt; def count(n1:Int, n1:Int) : List[Int] = (n1 &lt; n2) ? List() : List(n1, count((n1 - 1), n2))
  &lt;console&gt;:1: error: ';' expected but '(' found.
     def count(n1:Int, n1:Int) : List[Int] = (n1 &lt; n2) ? List() : List(n1, count((n1 - 1), n2))
  </code></pre>