fp2/monoid

Types

pub type Monoid(a) {
  Monoid(concat: fn(a, a) -> a, empty: a)
}

Constructors

  • Monoid(concat: fn(a, a) -> a, empty: a)

Functions

pub fn concat_all(m: Monoid(a)) -> fn(List(a)) -> a
pub fn from_semigroup(s: Semigroup(a), empty: a) -> Monoid(a)
pub fn monoid_string() -> Monoid(String)
pub fn to_semigroup(m: Monoid(a)) -> Semigroup(a)