title: Understanding order of evaluation in Haskell
body: <p>I am trying to understand how where clauses evaluate in Haskell. Say we got this toy example where bar, baz and bat are defined functions somewhere:</p>
  
  <pre><code>func x = foo i j k
    where
      foo i j k = i + j + k
      k = bat x
      j = baz k
      i = bar j
  </code></pre>
  
  <p>How does the line <code>func x = foo i j k</code> expand? Does it evaluate to something like <code>func x = foo(i(j(k)), j(k), k)</code> or <code>func x = foo(i, j, k)</code>?</p>