Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Project Euler - Problem 4

View euler-004.hs
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.