package preface

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A Semigroup is a type t which provides a binary associative operation combine which lets you combine any two values of t into one.

Laws

To ensure that the derived combiners work properly, the combine function must comply with the following laws:

  1. combine (combine a b) c = combine a (combine b c)

Minimal definition

module type WITH_COMBINE = sig ... end

The minimum definition of a Semigroup. It is by using the combinators of this module that the other combinators will be derived.

Structure anatomy

module type CORE = WITH_COMBINE

Basis operations.

module type OPERATION = sig ... end

Additional operations.

module type INFIX = sig ... end

Infix operators.

Complete API

module type API = sig ... end

The complete interface of a Semigroup.

Additional references

OCaml

Innovation. Community. Security.