title: getting error :: rest: expects a non-empty list; given: () in dr racket when checking tests
body: <p>I'm trying to write a function that checks if a given list is spiraling (numbers going from negative to positive while the abs value of the numbers is strictly increasing) </p>
  
  <p>EX:</p>
  
  <pre><code>(check-expect
   (spiraling? (cons 1 (cons -10 (cons 100 empty))))
   true)
  </code></pre>
  
  <p>Im not entirely sure even where my error is so i made slight adjustments in my writing that hasnt done anything.</p>
  
  <pre><code>(define (spiraling? list-of-int)
    (cond
      [(empty? list-of-int) true]
      [(and (number? (first list-of-int))
            (empty? (rest list-of-int))) true] 
      [(and (&lt; (abs (first list-of-int))
               (abs (first (rest (first list-of-int)))))
            (cond
              [(and (&gt; 0 (first list-of-int))
                    (&lt; 0 (first (rest (first list-of-int)))))true]
              [(and (&lt; 0 (first list-of-int))
                    (&gt; 0 (first (rest (first list-of-int)))))true]
              [else false]))
       (cond
         [(empty? list-of-int) true]
         [else (spiraling? (rest list-of-int))])]))
  
  
  
  (check-expect
  (spiraling? (cons 1 (cons -10 (cons 100 empty))))
  true)
  (check-expect
  (spiraling? (cons -1 (cons 2 (cons -3 (cons 4 empty)))))
  true)
  (check-expect
  (spiraling? (cons 99 (cons -100 (cons 100 empty))))
  false)
  (check-expect
  (spiraling? (cons 0 (cons -10 (cons 100 empty))))
  false)
  </code></pre>
  
  <p>But instead it comes out as:</p>
  
  <pre><code>:: rest: expects a non-empty list; given: ()
  </code></pre>