SyntaxFix
Write A Post
Hire A Developer
Questions
here's a f# version:
let reverseNumber n = let rec loop acc = function |0 -> acc |x -> loop (acc * 10 + x % 10) (x/10) loop 0 n let isPalindrome = function | x when x = reverseNumber x -> true | _ -> false