This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
project-euler/e0004/euler0004.rkt

9 lines
298 B
Racket
Raw Permalink Normal View History

2017-05-09 20:10:38 +02:00
#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))))))