Skip to content

Instantly share code, notes, and snippets.

@wangbj
Created October 14, 2014 17:27
Show Gist options
  • Save wangbj/d09a17f8e22d5427a396 to your computer and use it in GitHub Desktop.
Save wangbj/d09a17f8e22d5427a396 to your computer and use it in GitHub Desktop.
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