package preface

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

Invariant is and "Invariant Functor". Every Functor and Contravariant is an Invariant Functor.

Laws

To have a predictable behaviour, the instance of Invariant must obey some laws.

  1. invmap id id = id
  2. invmap f2 f2' % invmap f1 f1' = invmap (f2 % f1) (f1' % f2')

Minimal definition

module type WITH_INVMAP = sig ... end

Structure anatomy

module type CORE = WITH_INVMAP

Complete API

module type API = CORE

The complete interface of an Invariant.

Additional references

OCaml

Innovation. Community. Security.