Skip to main content
added 198 characters in body
Source Link
Jo King
  • 47.5k
  • 5
  • 125
  • 186

Perl 6, 3231 bytes

*>>.&{(try $_-1)||.succ.comb[0]||chr ord ++$_}

Try it online!Try it online!

Anonymous Whatever lambda that maps each element to the list and attempts to subtract one from it, otherwise incrementing it and taking the first character in the case that z wraps over to aa.

Perl 6, 32 bytes

*>>.&{(try $_-1)||.succ.comb[0]}

Try it online!

Perl 6, 31 bytes

*>>.&{(try $_-1)||chr ord ++$_}

Try it online!

Anonymous Whatever lambda that maps each element to the list and attempts to subtract one from it, otherwise incrementing it and taking the first character in the case that z wraps over to aa.

Source Link
Jo King
  • 47.5k
  • 5
  • 125
  • 186

Perl 6, 32 bytes

*>>.&{(try $_-1)||.succ.comb[0]}

Try it online!