title: Omitting curly braces in scala for multiple lines
body: <p>I've seen some samples of scala code where multiple lines of code are used as a block of code with no curly braces, for instance:</p>
  
  <pre><code>x match {
    case a:Int =&gt;
      val b = 1
      val c = b +3
      println("hello!")
      c
    case _ =&gt; 5
  }
  </code></pre>
  
  <p>same with some very long functions that use an implicit param of the form:</p>
  
  <pre><code>a.map { implicit x =&gt;
    // many, many complex lines of code
  }
  </code></pre>
  
  <p>as opposed to:</p>
  
  <pre><code>a.map { implicit x =&gt; {
    // many, many complex lines of code
  }}
  </code></pre>
  
  <p>I've seen a lot of documentation/FAQ stating that multiple lines of code should be surrounded always by curly braces, but could not find an explanation for these exceptions. I would love to understand or have a good intuition so that does not feel like magic to me.</p>