function is_palindrome(s) return s == s:reverse() end print(is_palindrome('rotor')) print(is_palindrome('racecar')) print(is_palindrome('rosetta'))