utils

Functions

pub fn add_prefix(s: String, prefix: String) -> String
pub fn at(data: List(a), index: Int) -> Result(a, Nil)

Gets the entry of a 1D-List at a given index

pub fn format_int(n: Int) -> String
pub fn format_sum(l: List(Int), prefix: String) -> String
pub fn join(chars: List(String)) -> String
pub fn main() -> List(String)
pub fn parse_entry(entry: String) -> Int
pub fn parse_row(line: String) -> List(Int)
pub fn print_with_part(result: String, part: String) -> Nil
pub fn read(filepath: String) -> String
pub fn read_chars(filepath: String) -> List(List(String))

Reads a file line by line and splits the rows into individual characters

pub fn read_lines(filepath: String) -> List(String)
pub fn split_by_empty_row(
  input: List(String),
) -> List(List(String))

Given a list of strings, return a list of lists of strings, seperated by empty rows

pub fn sum(l: List(Int)) -> Int
pub fn to_string(n: Int) -> String
Search Document