From b07cf8c4ccd2cd032e99bc5c14891851fec4dda1 Mon Sep 17 00:00:00 2001 From: Packy Anderson Date: Sat, 5 Jul 2025 00:07:49 -0400 Subject: Fix Elixir case. --- challenge-328/packy-anderson/elixir/ch-1.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenge-328/packy-anderson/elixir/ch-1.exs b/challenge-328/packy-anderson/elixir/ch-1.exs index e396a61f9f..67d0bfd191 100755 --- a/challenge-328/packy-anderson/elixir/ch-1.exs +++ b/challenge-328/packy-anderson/elixir/ch-1.exs @@ -1,7 +1,7 @@ #!/usr/bin/env elixir defmodule PWC do - def replaceAllQuestion(str) do + def replace_all_question(str) do match = Regex.named_captures( ~r/(?.)\?+(?.)/, str @@ -13,7 +13,7 @@ defmodule PWC do replace = ?a..?z |> Enum.take_random(1) |> List.to_string str = Regex.replace(~r/\?/, str, replace, global: false) # recursively call this function to replace any remaining ?s - replaceAllQuestion(str) + replace_all_question(str) else # return the unmodified string if there are no ? characters str @@ -22,7 +22,7 @@ defmodule PWC do def solution(str) do IO.puts("Input: $str = \"#{str}\"") - IO.puts("Output: \"#{replaceAllQuestion(str)}\"") + IO.puts("Output: \"#{replace_all_question(str)}\"") end end -- cgit