crsanti / advent-of-code-elixir-boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent Of Code

This is a boilerplate to solve Advent Of Code exercises using Elixir.

How to use it

In order to run a specific day and part just use:

mix aoc day<number> [part]

Examples:

To run day 5, part 2:

mix aoc day5 2

To run day 7, part 1:

mix aoc day7 1

or

mix aoc day7

How to add days

Just create a module in ./src/day<number>/day<number>.ex that exports three functions:

defmodule AdventOfCode.Day1 do
  def input do
    ""
  end

  def run1(input) do
  end

  def run2(input) do
  end
end

You may want to also add ./src/day<number>/day<number>.md with the description.


Happy coding~🎄!

About

License:MIT License


Languages

Language:Elixir 100.0%