Skip to content

Instantly share code, notes, and snippets.

@DrunkenAlcoholic
Last active October 17, 2024 15:04
Show Gist options
  • Save DrunkenAlcoholic/cb700e07ac0e389930d316ab63012689 to your computer and use it in GitHub Desktop.
Save DrunkenAlcoholic/cb700e07ac0e389930d316ab63012689 to your computer and use it in GitHub Desktop.
Mexican Wave [Codewars - Nim]
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