diff --git a/day4/day4part2.exs b/day4/day4part2.exs index 0b0b780..138b32a 100644 --- a/day4/day4part2.exs +++ b/day4/day4part2.exs @@ -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()