Preface_make.Foldable
Building a Preface_specs.Foldable
Build a Preface_specs.FOLDABLE
using Preface_specs.Foldable.WITH_FOLD_MAP
.
Standard method, using the minimal definition of an alt to derive its full API.
module Via_fold_map
(Req : Preface_specs.Foldable.WITH_FOLD_MAP) :
Preface_specs.FOLDABLE with type 'a t = 'a Req.t
Build a Preface_specs.FOLDABLE
using Preface_specs.Foldable.WITH_FOLD_RIGHT
.
Standard method, using the minimal definition of an alt to derive its full API.
module Via_fold_right
(Req : Preface_specs.Foldable.WITH_FOLD_RIGHT) :
Preface_specs.FOLDABLE with type 'a t = 'a Req.t
Construction of Preface_specs.FOLDABLE
by combining them.
Right-to-left composition of Preface_specs.FOLDABLE
.
module Composition
(F : Preface_specs.FOLDABLE)
(G : Preface_specs.FOLDABLE) :
Preface_specs.FOLDABLE with type 'a t = 'a G.t F.t
Sum of Preface_specs.FOLDABLE
using the technique described in Data types à la carte by W. Swierstra.
module Sum
(F : Preface_specs.FOLDABLE)
(G : Preface_specs.FOLDABLE) :
sig ... end
Construct the product of two Preface_specs.FOLDABLE
.
module Product
(F : Preface_specs.FOLDABLE)
(G : Preface_specs.FOLDABLE) :
Preface_specs.FOLDABLE with type 'a t = 'a F.t * 'a G.t
module Index
(F : Preface_specs.FOLDABLE) :
Preface_specs.INDEXED_FOLDABLE with type ('a, 'index) t = 'a F.t
Advanced way to build a Preface_specs.FOLDABLE
, constructing and assembling a component-by-component of Preface_specs.FOLDABLE
. (In order to provide your own implementation for some features.)
module Via
(C : Preface_specs.Foldable.CORE)
(O : Preface_specs.Foldable.OPERATION with type 'a t = 'a C.t) :
Preface_specs.FOLDABLE with type 'a t = 'a O.t
module Core_via_fold_right
(Req : Preface_specs.Foldable.WITH_FOLD_RIGHT) :
Preface_specs.Foldable.CORE with type 'a t = 'a Req.t
module Core_via_fold_map
(Req : Preface_specs.Foldable.WITH_FOLD_MAP) :
Preface_specs.Foldable.CORE with type 'a t = 'a Req.t
module Operation
(C : Preface_specs.Foldable.CORE) :
Preface_specs.Foldable.OPERATION with type 'a t = 'a C.t