title: How to convert this let/where function to a Lambda in Haskell
body: <p>How exactly do I convert this let/where function to a lambda in Haskell?</p>
  
  <p>Let statement form:</p>
  
  <pre><code>calc x =    let ad5 x = x + 5
                  sqr x = x * x
                  dbl x = x * 2
              in
                  ad5 . sqr . dbl $ x
  </code></pre>
  
  <p>Where declaration form:</p>
  
  <pre><code>calc x = ad5 . sqr . dbl $ x
    where
          ad5 x = x + 5
          sqr x = x * x
          dbl x = x * 2
  </code></pre>
  
  <p>Lambda form? Maybe similar to this example from Get Prog, where the variables are declared first, and then defined at the bottom:</p>
  
  <pre><code>sumSqrOrSqrSum4 x y =   (\sumSqr sqrSum -&gt;
                          if sumSqr &gt; sqrSum
                          then sumSqr
                          else sqrSum) (x^2 + y^2) ((x + y)^2)
  </code></pre>