;; ;; FILE: any-bigger-than.rkt ;; AUTHOR: Eugene Wallingford ;; DATE: 2025/02/17 ;; COMMENT: A solution to the opening exercise for Session 9. ;; #lang racket (require rackunit) ;; -------------------------------------------------------------------- (check-true (any-bigger-than? 1 '(1 2 3))) (check-false (any-bigger-than? 5 '(1 2 3))) (check-true (any-bigger-than? 40 '(26 37 41 25 12))) (check-false (any-bigger-than? 40 '(26 37 14 25 12))) ;; -------------------------------------------------------------------- ;; (define (any-bigger-than? n lon) ;; (if (null? lon) ;; #f ;; (or (< n (first lon)) ;; (any-bigger-than? n (rest lon))))) ;; --------------------------------------------------------------------