Last active
October 17, 2024 15:04
-
-
Save DrunkenAlcoholic/cb700e07ac0e389930d316ab63012689 to your computer and use it in GitHub Desktop.
Mexican Wave [Codewars - Nim]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/strutils | |
proc wave(people: string): seq[string] = | |
for i, letter in people: | |
if letter == char(32): | |
continue | |
result.add(people[0..pred(i)] & people[i].toUpperAscii & people[succ(i)..^1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment