Created
October 14, 2014 17:27
-
-
Save wangbj/d09a17f8e22d5427a396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revdigits x = go x 0 | |
where go k r | |
| k == 0 = r | |
| otherwise = go d (10*r+m) | |
where (d, m) = k `quotRem` 10 | |
isPalin x = id x == revdigits x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment