package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

Dune Dependency

Authors

Maintainers

Sources

v3.9.0.tar.gz
md5=ea26b5c72e6731e59d856626049cca4d
sha512=55975b62c26f6db77433a3ac31f97af609fc6789bb62ac38b267249c78fd44ff37fe81901f1cf560857b9493a6046dd37b0d1c0234c66bd59e52843aac3ce6cb

doc/batteries.unthreaded/BatInterfaces/index.html

Module BatInterfacesSource

Common signatures for data structures.

Sourcemodule type Mappable = sig ... end

A signature for data structures which have a map : ('a -> 'b) -> ('a t -> 'b t) operation.

Sourcemodule type OrderedType = sig ... end

Monads are a design pattern which may be used to enforce strong functional or non-functional constraints on the manipulation of resources, while remaining in the world of functional programming. For instance, monads may serve to implement approximations of a types-and-effects type system, to enforce functional use of arrays or other mutable data structures, or to enforce the fact that only files opened for writing may be actually used for writing.

For more information on monads, see A Monad Tutorial for Ocaml.

This definition is compatible with the standard syntax extension for monads. For more information, see the documentation of pa_monad.

  • author David Teller
Sourcemodule type Monad = sig ... end

Signature for monads

OCaml

Innovation. Community. Security.