public
Created

Project Euler - Problem 4

  • Download Gist
euler-004.hs
Haskell
1 2 3 4 5 6 7 8 9
result = maximum
$ foldr (++) []
$ map palindromes [999,998..1]
where palindromes x =
filter isPalindrome
$ zipWith (*)
(replicate x x)
[1..x]
isPalindrome n = show n == reverse (show n)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.