Module

Data.Semigroup

Package
purescript-prelude
Repository
purescript/purescript-prelude

#Semigroup Source

class Semigroup a  where

The Semigroup type class identifies an associative operation on a type.

Instances are required to satisfy the following law:

  • Associativity: (x <> y) <> z = x <> (y <> z)

One example of a Semigroup is String, with (<>) defined as string concatenation.

Members

Instances

#(<>) Source

Operator alias for Data.Semigroup.append (right-associative / precedence 5)

#SemigroupRecord Source

class SemigroupRecord rowlist row subrow | rowlist -> subrow where

A class for records where all fields have Semigroup instances, used to implement the Semigroup instance for records.

Members

Instances