problem 4 solution in racket

This commit is contained in:
Lowl3v3l 2017-05-09 20:10:38 +02:00
parent 7ae79991f5
commit 14379b035f

9
4/euler4.rkt Normal file
View file

@ -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))))))