1
0
Fork 0
main
Bill Ewanick 2023-10-20 12:30:14 -04:00
parent 08a37af729
commit 224c8cf70c
1 changed files with 2 additions and 2 deletions

View File

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