Skip to content

Commit

Permalink
do not use unless in example solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegillet committed Dec 9, 2024
1 parent 7c55ee7 commit dbdcf5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/practice/alphametics/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Alphametics do
Enum.find_value(numbers, fn number ->
leading_zero? = number == 0 && letter in problem.first_letters

unless leading_zero? do
if !leading_zero? do
numbers = List.delete(numbers, number)
solution = put_in(solution[letter], number)
solve(letters, numbers, solution, problem)
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/largest-series-product/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule Series do
end

def largest_product(number_string, size) do
unless Enum.member?(Range.new(0, String.length(number_string)), size) do
if not Enum.member?(Range.new(0, String.length(number_string)), size) do
raise ArgumentError
end

Expand Down

0 comments on commit dbdcf5b

Please sign in to comment.