package preface

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

Alt is a Functor which is a kind of Semigroup over a parametrized type. In other word, Alt is a Functor with a combine operation.

Laws

To ensure that the derived combiners work properly, an Alt should respect these laws:

  1. combine (combine a b) c = combine a (combine b c)
  2. map f (combine a b) = combine (map f a) (map f b)

Minimal definition

module type WITH_COMBINE = sig ... end

Combine operation. This signature is mainly used to enrich a Functor with combine.

module type WITH_COMBINE_AND_MAP = sig ... end

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

Structure anatomy

module type CORE = WITH_COMBINE_AND_MAP

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 an Alt.

Additional references

OCaml

Innovation. Community. Security.