Reduce needless repetition

This commit is contained in:
João Pinheiro
2023-07-09 23:55:26 +01:00
parent c3ef2f8e3a
commit 22dc34096d
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ defmodule Functions do
assert first("One") == ___ assert first("One") == ___
end end
def repeat_again(message, times \\ 5) do def repeat_again(message, times \\ 3) do
String.duplicate(message, times) String.duplicate(message, times)
end end

View File

@@ -7,7 +7,7 @@ defmodule FunctionsTests do
"Hello, World!", "Hello, World!",
3, 3,
{:multiple, ["One and Two", "Only One"]}, {:multiple, ["One and Two", "Only One"]},
{:multiple, ["Hello Hello Hello Hello Hello ", "Hello Hello "]}, {:multiple, ["Hello Hello Hello ", "Hello Hello "]},
{:multiple, [:entire_list, :single_thing]}, {:multiple, [:entire_list, :single_thing]},
{:multiple, ["10 is bigger than 5", "4 is not bigger than 27"]}, {:multiple, ["10 is bigger than 5", "4 is not bigger than 27"]},
{:multiple, ["The number was zero", "The number was 5"]}, {:multiple, ["The number was zero", "The number was 5"]},