package acgtk

  1. Overview
  2. Docs
Abstract Categorial Grammar development toolkit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

acg-2.2.0-20251107.tar.gz
sha512=07f391d052090bb70c10ec511fdc53af764954cbe1c30093778984c5ed41a4327573fdac0890c6fd619ff9827725572eb7b8a7545bd8ccb7f5bddb84d2d7f7cc

doc/acgtk.utilsLib/UtilsLib/Table/Make_table/index.html

Module Table.Make_tableSource

This modules provides the functor

Parameters

module _ : BASE

Signature

Sourcetype 'a t

The type of the tables

Sourcetype key = int

The type of the key

Sourceval empty : 'a t

empty returns the empty table

Sourceval add : ?overwrite:bool -> key -> 'a -> 'a t -> 'a t option

add k v t modifies the table t to add the element v at key k. The optional value overwrite is set to false by default. When set to false, the add function return None when the key k was already associated with some value. When set to true, the add function returns the table t unmodified if some value was already associated to the key

Sourceval find : key -> 'a t -> 'a option

find k t returns the element associated with the key k in t if found. Returns None otherwise

Sourceval fold : (key -> 'a -> 'b -> 'b) -> 'b -> 'a t -> 'b

fold f a t returns f kn vn (f kn-1 vn-1 (...(f k1 v1 a) ...)) where the ki and vi are the associated values in t. The elements are listed in order wrt. to the key

Sourceval iter : (key -> 'a -> unit) -> 'a t -> unit

fold f a t returns f kn vn (f kn-1 vn-1 (...(f k1 v1 a) ...)) where the ki and vi are the associated values in t. The elements are listed in order wrt. to the key

Sourceval pp : ?sep: ((Format.formatter -> (key * 'a) -> unit) -> (key * 'a) -> unit, Format.formatter, unit, unit, unit, (Format.formatter -> (key * 'a) -> unit) -> (key * 'a) -> unit) format6 -> (Format.formatter -> key -> 'a -> unit) -> Format.formatter -> 'a t -> unit