From 3eac9fe92adac89bc529a89bfa370999ada6229a Mon Sep 17 00:00:00 2001 From: Adam Millerchip Date: Fri, 4 Dec 2020 15:58:50 +0900 Subject: [PATCH] Remove an unneeded Enum.map --- day4/day4part2.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()