use Map.reject
This commit is contained in:
parent
fb87183a6f
commit
32679a526a
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ defmodule Day9 do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp remove_nines(cave) do
|
defp remove_nines(cave) do
|
||||||
floor = cave.floor |> Enum.reject(&match?({_k, 9}, &1)) |> Map.new()
|
floor = Map.reject(cave.floor, &match?({_k, 9}, &1))
|
||||||
%Cave{cave | floor: floor}
|
%Cave{cave | floor: floor}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue