From 8315bce75638124adc258d1b360a6d4d8780008a Mon Sep 17 00:00:00 2001 From: Daniel Jaouen Date: Tue, 12 Mar 2024 12:00:40 -0400 Subject: [PATCH] Refactor --- lib/dynamic_programming_in_elixir.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_programming_in_elixir.ex b/lib/dynamic_programming_in_elixir.ex index e8e0a95..1344559 100644 --- a/lib/dynamic_programming_in_elixir.ex +++ b/lib/dynamic_programming_in_elixir.ex @@ -51,7 +51,7 @@ defmodule DynamicProgrammingInElixir do else in_edges = :digraph.in_edges(g, sink) - if in_edges == [] do + if Enum.empty?(in_edges) do {:error, "Cannot reach source from current path"} else in_edges