From 7d9b68597bcd46e21e0e91aecb6d6620aa3e79e4 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 3 Dec 2018 08:49:39 -0500 Subject: consistent naming --- day2.exs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'day2.exs') diff --git a/day2.exs b/day2.exs index 620ba5a..6aa5ff0 100644 --- a/day2.exs +++ b/day2.exs @@ -1,11 +1,11 @@ defmodule Day2 do - def get_lines() do - File.stream!("day2.in") + def input() do + File.stream!("input/day2.in") |> Stream.map(&String.trim/1) end def find_subcount(count) do - get_lines() + input() |> Enum.reduce(0, fn x, acc -> if x |> String.graphemes() @@ -22,7 +22,7 @@ defmodule Day2 do end def find_common_chars() do - get_lines() + input() |> Enum.reduce(%MapSet{}, fn x, acc -> x |> String.graphemes() -- cgit 1.4.1