title: Racket scheme define constant in function
body: <p>I am beginer to scheme. I have function like this:</p>
  
  <pre><code>(define (getRightTriangle A B N) (
                              cond
                                [(and (integer? (sqrt (+ (* A A) (* B B)))) (&lt;= (sqrt (+ (* A A) (* B B))) N))
                                 (list (sqrt (+ (* A A) (* B B))) A B)
                                 ]
                                [else (list)]
  
                              )
  </code></pre>
  
  <p>In this function I compute (sqrt (+ (* A A) (* B B))) several times. I want to compute this expression only once in beginning of this function (make constant or variable) but I don't know how...</p>