alg_structs

Interfaces and module combinators for algebraic structures
IN THIS PACKAGE
Module Alg_structs

Structures

Triviality

module Triv : sig ... end

A solitary type

Functors

module Functor : sig ... end

An interface for types that can be mapped over.

module Applicative : sig ... end

Applicative functors "allow sequencing of functorial computations" (wikipedia) with the limitation that "values computed by subcomputations cannot affect what subsequent computations will take place" (Core docs).

Algebras

module Semigroup : sig ... end

An interface for a type with a binary, associative operator over it.

module Monoid : sig ... end

An interface for a type with a binary, associative operator over it and a privileged unit value.

Folding

module Foldable : sig ... end

Data structures that can be folded over.

Utilities

module NonEmptyList : sig ... end

Non-empty lists

type 'a proxy =
| Proxy

Proxy : 'a is a proxy for type 'a, allowing one to pass the type around without having to present a witnessing value.

See Haskell's Proxy.