cmd/run

Types

pub type DayRunner =
  fn(String) -> Solution
pub type RunError {
  Undef
  RunFailed
}

Constructors

  • Undef
  • RunFailed
pub type RunnerMap =
  Map(Day, DayRunner)
pub type Solution =
  #(Int, Int)

Functions

pub fn build_runners_from_days_dir() -> Result(
  Map(Int, fn(String) -> #(Int, Int)),
  Snag,
)
pub external fn do_run(
  fn(String) -> Solution,
  String,
) -> gleam.Result(Solution, RunError)
pub fn register_command(glint: Command(Result(List(String), Snag)), runners: Map(
    Int,
    fn(String) -> #(Int, Int),
  )) -> Command(Result(List(String), Snag))
pub fn run(input: CommandInput, runners: Map(
    Int,
    fn(String) -> #(Int, Int),
  )) -> Result(List(String), Snag)