Skip to content

Commit

Permalink
Remove ParallelStream.filter for trivial operation
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljaouen committed Apr 15, 2024
1 parent 38a311e commit 171bca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dynamic_programming_in_elixir.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule DynamicProgrammingInElixir do
else
in_edges
|> ParallelStream.map(fn edge -> calculate_current_path(g, source, edge) end)
|> ParallelStream.filter(fn x -> elem(x, 0) == :ok end)
|> Enum.filter(fn x -> elem(x, 0) == :ok end)
|> Enum.to_list()
|> my_min()
end
Expand Down

0 comments on commit 171bca9

Please sign in to comment.