title: bad syntax (multiple expressions after identifier)
body: <p>I am writing a function, <code>try-weak-cues</code>, to select a response from a large set of responses. This program is essentially a conversation with the user.</p>
  
  <pre><code>(define try-weak-cues
          (lambda (sentence context)
          (define helper
             (lambda(list-of-pairs)
            (define helper2
              (lambda(list-of-pairs context)
                (cond((null? list-of-pairs)
                    (cond((null? list-of-pairs) '())
                         ((any-good-fragments?(cue-part(car list-of-pairs))sentence) (helper2(cdr(car list-of-pairs))context))
                          (else(helper(cdr list-of-pairs)))))))))
                         (helper *weak-cues*))))
  </code></pre>
  
  <p>Below is the list of responses that the function is supposed to pull from:</p>
  
  <pre><code> (define *weak-cues*
    '( ( ((who) (whos) (who is))
         ((first-base)
             ((thats right) (exactly) (you got it)
          (right on) (now youve got it)))
         ((second-base third-base)
             ((no whos on first) (whos on first) (first base))) )
       ( ((what) (whats) (what is))
         ((first-base third-base)
         ((hes on second) (i told you whats on second)))
         ((second-base)
         ((right) (sure) (you got it right))) )
       ( ((whats the name))
         ((first-base third-base)
         ((no whats the name of the guy on second)
          (whats the name of the second baseman)))
         ((second-base)
      ((now youre talking) (you got it))))
     ))
  </code></pre>
  
  <p>The error:</p>
  
  <blockquote>
    <p>define: bad syntax (multiple expressions after identifier) in: (define
    helper (lambda (list-of-pairs) (define helper2 (lambda (list-of-pairs
    context) (cond ((null? list-of-pairs) (cond ((null? list-of-pairs)
    (quote ())) ((any-good-fragments? (cue-part (car list-of-pairs))
    sentence) (helper2 (cdr (car list-of-pairs)) context)) (else (helper
    (cdr list-of-pairs))))))))) (helper <em>weak-cues</em>))</p>
  </blockquote>