Advent of Code 2015 Day 1 Part 1
Mix.install([
{:kino_aoc, "~> 0.1"}
])
Get Inputs
{:ok, puzzle_input} =
KinoAOC.download_puzzle("2015", "1", System.fetch_env!("LB_SESSION"))
My answer
puzzle_input
|> String.codepoints()
|> then(fn directions ->
2 * Enum.count(directions, fn d -> d == "(" end) - length(directions)
end)