title: Scheme: Program to iterate through a list and return only the non-numbers
body: <p>I'm trying to write a program in Scheme that takes a list and returns a list of only the non-number items in it.  This seems like it should work but it is only printing the entire list.  Can anyone see what I'm doing wrong here?</p>
  
  <pre><code>;;;up-to-first-number
  ;;;takes a list as its input and returns a list containing all
  ;;;the elements up to the first numeric element in the input list.
  
  ;;test lists
  (define mylist '(a b c 1 2 3))
  (define mylist2 '(1 2 2 4 5))
  
  
      (define (up-to-first-number list)
        (cond
         ((null? list)'())  ;if list is null, return null list
         ((number? list) '())  ;if item is a number, return null list
         (else (cons (car list) (up-to-first-number (cdr list)))) )) ;else, add item to new list and recurse
  </code></pre>
  
  <p>Thanks in advance for your help!</p>