package conex

  1. Overview
  2. Docs
Establish trust in community repositories

Install

Dune Dependency

Authors

Maintainers

Sources

conex-0.10.0.tbz
sha256=536163045d3624009c4a2ec678a1b531be9485db233f5db43613b3809180a1a9
md5=39cdb4e3a550703e61b2f56d20323fdd

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.

OCaml

Innovation. Community. Security.