(define (somme lis) (cond ((null? lis) 0) (else (+ (car lis) (somme (cdr lis)))) ) ) (define (list-nombres? lis) (cond ((null? lis) #t) ((number? (car lis)) (list-nombres? (cdr lis))) (else #f) ) ) (define (supersomme lis) (if (list-nombres? lis) (somme lis) (display "Non, ce n'est pas une bonne liste.") ) ) ( define ( eqExpr? x y ) ( cond ( ( symbol? x ) ( eq? x y ) ) ( ( number? x ) ( eq? x y ) ) ( ( char? x ) ( eq? x y ) ) ( ( string? x ) ( eqExpr? ( string->list x ) ( string->list y ) ) ) ( ( null? x ) ( null? y ) ) ( ( list? y ) ( if ( eqExpr? ( car x ) ( car y ) ) ( eqExpr? ( cdr x ) ( cdr y ) ) #f ) ) ( else #f ) ) )