title: Using `let ... in` with Function
body: <p><a href="http://learnyouahaskell.com/input-and-output#command-line-arguments" rel="nofollow noreferrer">Learn You a Haskell</a> presents the <code>shortLines</code> function:</p>
  
  <pre><code>shortLinesOnly :: String -&gt; String  
  shortLinesOnly input =   
      let allLines = lines input  
          shortLines = filter (\line -&gt; length line &lt; 10) allLines  
          result = unlines shortLines  
      in  result 
  </code></pre>
  
  <p>From this helpful <a href="https://stackoverflow.com/a/8274846/409976">post</a>, it seems clear to me that the following <code>let ... in</code> is correct:</p>
  
  <pre><code>&gt; (let x = 2 in x*2) + 3
  7
  </code></pre>
  
  <p>But, in the above <code>shortLinesOnly</code> example, why is the <code>let</code>'s <code>in</code> placed at <code>in result</code>?</p>