diff --git a/src/projectEuler/question4.hs b/src/projectEuler/question4.hs index c27fe1c..b2f60d5 100644 --- a/src/projectEuler/question4.hs +++ b/src/projectEuler/question4.hs @@ -17,9 +17,9 @@ threeDigitProducts = [ n*m | n <- [100..999], m <- [n..999] ] isPalindrome :: Integer -> Bool isPalindrome n = all (== True) $ zipWith (==) half half' where - (half, half'') = splitAt h n' + (half, half'') = splitAt l n' half' = reverse half'' - h = length n' `div` 2 + l = length n' `div` 2 n' = show n -- n' = trace (show n) $ show n