(define (eat-apples lst) (cond [(empty? lst) lst] [(equal? (first lst) 'apple) (eat-apples (rest lst))] [else (eat-apples lst)] ; this is what's causing the infinite loop, don't know what to do with it though. ) ) (eat-apples '(apple banana chicken))