An attempt at Advent Of Code using Elixir
iex -S mix
Day1.part1()
Day1.part2()
...
Dayn.partn()
Run all tests
mix test
Run exercise (day) specific tests
mix test --only day:1
There are some exercises where I iterated multiple times with different solutions.
All of the solutions were kept (when meaninfull) and can be called individually:
Day2.part2(:comprehension)
Day2.part2(:recursion)
If you want to benchmark differences use:
Benchee.run(
%{
"comprehension" => fn -> Day2.part2(:comprehension) end,
"recursion" => fn -> Day2.part2(:recursion) end,
"beam processes" => fn -> Day2.part2(:beam) end
}
)