package alg_structs

  1. Overview
  2. Docs

Module Alg_structs.FoldableSource

Data structures that can be folded over.

Seed

Sourcemodule type Seed = sig ... end

The Seed needed to generate an implementation of Foldable

Interface

Sourcemodule type S = sig ... end

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

Laws

Sourcemodule 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.

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

Implementations

Sourcemodule Option : S with type 'a t = 'a Option.t

Folds over optional values...

Sourcemodule List : S with type 'a t = 'a List.t

Implemented by Stdlib.ListLabels.

Sourcemodule Array : S with type 'a t = 'a Array.t

Implemented by Stdlib.ArrayLabels.

OCaml

Innovation. Community. Security.