Skip to main content
deleted 2 characters in body
Source Link
naffetS
  • 13.1k
  • 2
  • 22
  • 54

Vyxal, 1413 bytes

k⁰øl:[`shm`p|_[«88«p|_ 

Try it Online!Try it Online!

Port of Jelly.

How?

k⁰øl:[`shm`p|_[«88«p|_ k⁰øl # Strip leading consonants :[ # If there's anything left: `shm`p«88«p  # Prepend "shm"   |_  # Else, pop, returning the implicit input 

Vyxal, 14 bytes

k⁰øl:[`shm`p|_ 

Try it Online!

Port of Jelly.

How?

k⁰øl:[`shm`p|_ k⁰øl # Strip leading consonants :[ # If there's anything left: `shm`p # Prepend "shm"   |_ # Else, pop, returning the implicit input 

Vyxal, 13 bytes

k⁰øl:[«88«p|_ 

Try it Online!

Port of Jelly.

How?

k⁰øl:[«88«p|_ k⁰øl # Strip leading consonants :[ # If there's anything left: «88«p  # Prepend "shm" |_  # Else, pop, returning the implicit input 
Source Link
naffetS
  • 13.1k
  • 2
  • 22
  • 54

Vyxal, 14 bytes

k⁰øl:[`shm`p|_ 

Try it Online!

Port of Jelly.

How?

k⁰øl:[`shm`p|_ k⁰øl # Strip leading consonants :[ # If there's anything left: `shm`p # Prepend "shm" |_ # Else, pop, returning the implicit input