title: Using Let in Scheme
body: <p>I want to write a program to find the roots of the quadratic equation in Scheme. I used LET for certain bindings.</p>
  
  <pre><code>(define roots-with-let
    (λ (a b c)
      (let ((4ac (* 4 a c))
            (2a (* 2 a))
            (discriminant (sqrt ( - (* b b) (4ac)))))
        (cons ( / ( + (- b) discriminant) 2a)
              ( / ( - (- b) discriminant) 2a)))))
  </code></pre>
  
  <p>I defined the discriminant with <code>4ac</code>  since I did not want <code>(* 4 a c)</code>. Even though I have defined <code>(4ac (* 4 a c))</code>,  it is giving me this error:</p>
  
  <blockquote>
    <p>expand: unbound identifier in module in: <code>4ac</code>. </p>
  </blockquote>
  
  <p>My question is how is let evaluated (what order)? And if i want <code>4ac</code> in my <code>let</code> should i write another inner <code>let</code>? Is there a better way to do this?</p>