title: Using racket to return the list of animal's name corresponding to the given animal list
body: <p>I'm now using racket to build the function that return the list of animal's name corresponding to the given animal list.
  But there comes a problem.</p>
  
  <pre><code>(define (name-pets l)
      (cond
          [(eq? "dog" first(l)) (append 'happy (name-pets (rest (l))))]
          [(eq? "cat" first(l)) (append 'smart (name-pets (rest (l))))]
          [(eq? "pig" first(l)) (append 'pinky (name-pets (rest (l))))]
          [else (append 'unnamed (name-pets (rest (l))))]))
  (name-pets (list "pig" "cat" "dog" "dolphin"))
  </code></pre>
  
  <p>And when I ran the code,</p>
  
  <blockquote>
    <p>application: not a procedure;  expected a procedure that can be
    applied to arguments<br>
    given: '("pig" "cat" "dog" "dolphin")<br>
    arguments...: [none]</p>
  </blockquote>
  
  <p>What is the problem?</p>