package conex

  1. Overview
  2. Docs
Establishing trust in community repositories

Install

dune-project
 Dependency

Authors

Maintainers

Sources

conex-1.0.0.tbz
sha256=8ba730718cbf0a381f0bce3493d18bfea1823bee0f43e4cbddad222b66dc164f
sha512=a76787c46b7c867e41daba10989841e95e7a2ba142dd09ae078649fd60340fcef703f41ddffc67b9c899fb4a2956906a0c8f9d04db7da435ac502b19851a490a

doc/conex/Conex_utils/Tree/index.html

Module Conex_utils.TreeSource

Tree is a simple tree datatype, edge is a string, values are 'a lists.

Sourcetype 'a t

The main tree type

Sourceval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal eq a b compares a with b, using eq to compare values.

Sourceval empty : 'a t

empty is the only constructor of a tree.

Sourceval is_empty : 'a t -> bool
Sourceval sub : path -> 'a t -> 'a t
Sourceval fold : (path -> 'a list -> 'b -> 'b) -> 'b -> 'a t -> 'b

fold f acc t folds f over t, using the accumulator acc.

Sourceval pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit

pp pp_e ppf t pretty prints the tree t using pp_e for printing values.

Sourceval lookup : path -> 'a t -> 'a list option

lookup path t returns either Some values or None.

Sourceval lookup_prefix : path -> 'a t -> 'a list

lookup_prefix path t finds the closest non-empty 'a on path.

Sourceval insert : path -> 'a -> 'a t -> 'a t

insert path value t inserts value into t at path. If the key is already in the tree, its value is prepended.