gap

Functions

pub fn compare_lists(first_sequence: List(a), second_sequence: List(
    a,
  )) -> Comparison(a)

Compare two lists and return a ListComparison which will be styled as list when passed to to_styled

pub fn compare_strings(first: String, second: String) -> Comparison(
  String,
)

Compare two string and return a StringComparison which will be styled as string when passed to to_styled

pub fn to_styled(comparison: Comparison(a)) -> StyledComparison

Creates a StyledComparison from Comparison using default values for highting and serialization.

Example

> compare_strings("abc", "abe") |> to_styled()

This will return a StyledComparison(first, second) where “c” in first is green and “e” in second is red.

Search Document