title: scala how to write if else
body: <p>I am an new learner of scala, and i am trying to run this sample code</p>
  
  <pre><code> def isLast(c: Int, r: Int):Int ={
     if(r == 1)
     {
     return 1;
     }
  
    else if (r == c){
     return 1
      }
     }
  </code></pre>
  
  <p>But it gives me compile time error, saying </p>
  
  <pre><code>Multiple markers at this line
  - type mismatch;  found   : Unit  required: Int
  - type mismatch;  found   : Unit  required: Int
  </code></pre>
  
  <p>Kindly help me, and also suggest me some good site for learning scala.</p>