RosettaCodeData/Task/Palindrome-detection/Icon/palindrome-detection-3.icon
2023-07-01 13:44:08 -04:00

5 lines
131 B
Text

procedure palindrome(x) #: return x if s is x palindrome
local i
every if x[i := 1 to (*x+ 1)/2] ~== x[-i] then fail
return x
end