title: Scala: type mismatch; found : Unit required: Boolean
body: <p>Hi I'm just trying out my first bits of scala and have hit this error which I don't understand. I've been trying to work it out and have exhausted my ideas. Help?</p>
  
  <pre><code>scala&gt; def calculate(count: Int) : Boolean =    
       |           if (count&lt;0) false
  &lt;console&gt;:8: error: type mismatch;
   found   : Unit
   required: Boolean
                   if (count&lt;0) false
                   ^
  </code></pre>
  
  <p>Thanks</p>