Create the directories input and test_input.
mkdir input/ test_input/Place your personal puzzle inputs input and the example input into test_input, using the following naming convention.
d#{day}.txt
You can find a template file in lib/template.ex. Just copy this file and append the day of month to the module.
defmodule D1 do
@behaviour Solution
...
endThe functions test_result and test_result2 should return the example solution for the respective parts. The functions solve and solve2 should try to solve their respective part.
The module Solution comes with the functions try1 and try2. They accept a module and solve part one or 2 respectively.
iex> Solution.try1 D1
Running part one...
Test input:
1721
979
366
299
675
1456
Test was successful.
Solution: <redacted>
:ok