Remove an unneeded Enum.map

This commit is contained in:
Adam Millerchip 2020-12-04 15:58:50 +09:00
parent ace4184758
commit 3eac9fe92a

View file

@ -10,8 +10,8 @@ defmodule Day4Part2 do
|> String.split([" ", "\n"])
|> Enum.map(&String.split(&1, ":"))
|> Map.new(fn [k, v] -> {k, v} end)
|> Map.delete("cid")
end)
|> Enum.map(&Map.delete(&1, "cid"))
|> Enum.filter(&MapSet.subset?(@required, &1 |> Map.keys() |> MapSet.new()))
|> Enum.count(&valid?/1)
|> IO.puts()