title: 'let...in' expression in Scala
body: <p>In OCaml, the <code>let...in</code> expression allows you to created a named local variable in an expression rather than a statement. (Yes I know that everything is technically an expression, but <code>Unit</code> return values are fairly useless.) Here's a quick example in OCaml:</p>
  
  <pre><code>let square_the_sum a b = (* function definition *)
      let sum = a + b in (* declare a named local called sum *)
          sum * sum (* return the value of this expression *)
  </code></pre>
  
  <p>Here's what I would want the equivalent Scala to look like:</p>
  
  <pre><code>def squareTheSum(a: Int, b: Int): Int =
      let sum: Int = a + b in
          sum * sum
  </code></pre>
  
  <p>Is there anything in Scala that I can use to achieve this? </p>