RosettaCodeData/Task/Reverse-a-string/Lingo/reverse-a-string-1.lingo

8 lines
127 B
Plaintext

on reverse (str)
res = ""
repeat with i = str.length down to 1
put str.char[i] after res
end repeat
return res
end