aoc-2018/1.exs
2018-12-03 17:40:03 +11:00

7 lines
141 B
Elixir

File.stream!("input-1")
|> Stream.map(&String.trim/1)
|> Stream.map(fn n -> String.to_integer(n) end)
|> Enum.to_list
|> Enum.sum
|> IO.puts