ocaml-standard-library/lib/tree.mli

8 lines
326 B
OCaml
Raw Permalink Normal View History

open General
2021-12-16 10:01:08 +00:00
2021-12-16 10:01:08 +00:00
(* Combines two trees of the same type, with the specified value at the new top node. Runs in O(1). *)
2021-12-16 20:23:03 +00:00
val combine : 'a tree -> 'a tree -> 'a -> 'a tree
(** Applies the provided function to each element of the tree. Does not use constant stack space. Runs in O(n). *)
val map : ('a -> 'b) -> 'a tree -> 'b tree