diff --git a/4/euler4.rkt b/4/euler4.rkt new file mode 100644 index 0000000..3e35d05 --- /dev/null +++ b/4/euler4.rkt @@ -0,0 +1,9 @@ +#lang racket + +(define (palindrome-number? n) + (equal? (string->list (number->string n)) + (reverse (string->list (number->string n))))) + +(apply max (filter palindrome-number? + (flatten (for/list ((i (range 100 1000))) + (for/list ((j (range 100 1000))) (* i j)))))) \ No newline at end of file