YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
|
|
@ -1,9 +1,9 @@
|
|||
proc reverse(s): string =
|
||||
proc reverse(s: string): string =
|
||||
result = newString(s.len)
|
||||
for i,c in s:
|
||||
result[s.high - i] = c
|
||||
|
||||
proc isPalindrome(s): bool =
|
||||
proc isPalindrome(s: string): bool =
|
||||
s == reverse(s)
|
||||
|
||||
echo isPalindrome("FoobooF")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue