re: Daily Challenge #3 - Vowel Counter VIEW POST

FULL DISCUSSION
 

A solution in Elixir

defmodule VowelCounter do
  @vowels ~r/(a|e|i|o|u)/i
  
  def count(""), do: 0

  def count(string) do
    @vowels 
    |> Regex.scan(string)
    |> Enum.count() 
  end
end
code of conduct - report abuse