std.semigroup

Implementation of the Applicative type

Types

#[implicit]
type Semigroup a = { append : a -> a -> a }

Semigroup a represents an associative operation on a. This means the following laws must hold:

  • forall x . append x (append y z) == append (append x y) z

Values

let append ?s : forall a . [Semigroup a] -> a -> a -> a

Note
  • Known as (<>) or mappend in Haskell

#[infix(left, 4)]
let <> : forall a . [Semigroup a] -> a -> a -> a