day_11

Functions

pub fn add_to_with_default(
  input: Dict(Int, Int),
  key: Int,
  value: Int,
) -> Dict(Int, Int)
pub fn count_entries(input: Dict(Int, Int)) -> Int
pub fn get_num_digits(input: Int) -> Int
pub fn list_to_dict(input: List(Int)) -> Dict(Int, Int)
pub fn main() -> Nil
pub fn mutate_element(input: Int) -> List(Int)
pub fn mutate_list(
  input: List(Int),
  times: Int,
  memoized: Dict(#(Int, Int), List(Int)),
) -> List(Int)
pub fn process_element(
  input: Int,
  times: Int,
  memoized: Dict(#(Int, Int), List(Int)),
) -> #(List(Int), Dict(#(Int, Int), List(Int)))
pub fn process_line_out_of_order(
  input: Dict(Int, Int),
  count: Int,
) -> Dict(Int, Int)
pub fn split_digits(input: Int) -> List(Int)

Given a number 1234, return two numbers 12, 34. Assumes the number has an even amount of digits.

pub fn update_and_return(
  dict: Dict(a, b),
  key: a,
  value: b,
) -> #(b, Dict(a, b))
Search Document