package acgtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The module for trees

type 'a tree =
  1. | Node of 'a * 'a tree list
val pp : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a tree -> unit

pp ppf fmt t pretty prints the tree t on the formatter fmt using the pretty printer for tree nodes ppf

val fold_depth_first : (('a -> 'b) * ('b -> 'b -> 'b)) -> 'a tree -> 'b

fold_depth_first (f,g) t recursively computes (g a) b_1 .... b_n where a=f t_0 and b_i= f t_i and t is a tree of node t_0 and of children t_1...t_n

val label : 'a tree -> 'a
OCaml

Innovation. Community. Security.