title: Does Racket support internal "define"?
body: <p>I'm new to functional language and I'm doing SICP programming assignments using Racket.</p>
  
  <p>Below is a snippet of code, and Racket informs me that <code>define: expected only one expression for the function body, but found 5 extra parts</code>, in line 5 (<code>(define (y k)</code>):</p>
  
  <pre><code>(define (simpson f a b n)
  
   (define h (/ (- b a) n))
  
   (define (y k)
    (f (+ a (* k h))))
  
   (define (factor k)
    (cond ((or (= k 0) (= k n))
           1)
     ((odd? k)
      4)
     (else
      2)))
  
   (define (term k)
    (* (factor k)
     (y k)))
  
   (define (next k)
    (+ k 1))
  
  (if (not (even? n))
   (error "n can't be odd")
   (* (/ h 3)
    (sum term (exact-&gt;inexact a) next n))))
  </code></pre>
  
  <p>I guess this problem is related to the language settings, but I already use "advanced" option.</p>
  
  <p>Anybody know how to configure Racket properly, or internal "define" is not supported?</p>