Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
7
Task/Reverse-a-string/Lingo/reverse-a-string-1.lingo
Normal file
7
Task/Reverse-a-string/Lingo/reverse-a-string-1.lingo
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
on reverse (str)
|
||||
res = ""
|
||||
repeat with i = str.length down to 1
|
||||
put str.char[i] after res
|
||||
end repeat
|
||||
return res
|
||||
end
|
||||
8
Task/Reverse-a-string/Lingo/reverse-a-string-2.lingo
Normal file
8
Task/Reverse-a-string/Lingo/reverse-a-string-2.lingo
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
on reverseBytes (str)
|
||||
ba = byteArray(str)
|
||||
res = byteArray()
|
||||
repeat with i = ba.length down to 1
|
||||
res[res.length+1] = ba[i]
|
||||
end repeat
|
||||
return res
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue