package alg_structs

  1. Overview
  2. Docs

Data structures that can be folded over.

Seed

module type Seed = sig ... end

The Seed needed to generate an implementation of Foldable

Interface

module type S = sig ... end

The Seed needed to generate an implementation of Foldable for the type t.

Laws

module Law (F : S) : sig ... end

Law notes the laws that should be obeyed by any instantiation of Foldable in the form of predicates that should hold true for any arguments of the appropriate type.

module Make (Seed : Seed) : S with type 'a t = 'a Seed.t

Implementations

module Option : S with type 'a t = 'a Stdlib.Option.t

Folds over optional values...

module List : S with type 'a t = 'a Stdlib.List.t

Implemented by Stdlib.ListLabels.

module Array : S with type 'a t = 'a Stdlib.Array.t

Implemented by Stdlib.ArrayLabels.