aoc-2018/1.exs

7 lines
141 B
Elixir
Raw Normal View History

2018-12-02 22:40:03 -08:00
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