A semigroup is a binary associative operation.

- class Semigroup a where
- (.++.) :: a -> a -> a

- (<++>) :: (Applicative f, Semigroup a) => f a -> f a -> f a

# Documentation

A binary operation that must satisfy associativity. Unlike a `Monoid`

, an identity in not essential.

Semigroup Ordering | |

Semigroup () | |

Semigroup All | |

Semigroup Any | |

Semigroup [a] | |

Semigroup a => Semigroup (IO a) | |

Semigroup a => Semigroup (Dual a) | |

Semigroup (Endo a) | |

Num a => Semigroup (Sum a) | |

Num a => Semigroup (Product a) | |

Semigroup (First a) | |

Semigroup (Last a) | |

Semigroup a => Semigroup (Maybe a) | |

Monoid a => Semigroup (Identity a) | |

Semigroup b => Semigroup (a -> b) | |

(Semigroup a, Semigroup b) => Semigroup (a, b) | |

(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) | |

(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) | |

(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) |

(<++>) :: (Applicative f, Semigroup a) => f a -> f a -> f aSource

A binary associative operation lifted into an applicative functor.