Skip to content

Commit

Permalink
docs(Trie): random updates
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Sep 21, 2023
1 parent eee4d3e commit 87e95fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Trie.mli
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ val detach_root : ('data, 'tag) t -> ('data * 'tag) option * ('data, 'tag) t
*)
val to_seq : ?prefix:bwd_path -> ('data, 'tag) t -> (path * ('data * 'tag)) Seq.t

(** [to_seq_with_bwd_paths] is like {!val:to_seq}, but with paths in the backward direction.
This is potentially more efficient than {!val:to_seq} because the conversion from backward lists to forward lists is skipped.
(** [to_seq_with_bwd_paths] is like {!val:to_seq}, but with paths represented as backward lists.
This is potentially more efficient than {!val:to_seq} because the conversion from a backward list to a forward list takes linear time.
@param prefix The prefix prepended to any path in the output. The default is the empty prefix ([Emp]).
*)
val to_seq_with_bwd_paths : ?prefix:bwd_path -> ('data, 'tag) t -> (bwd_path * ('data * 'tag)) Seq.t

(** [to_seq_values t] traverses through the trie [t] in the lexicographical order but only returns the associated data and tags. This is potentially more efficient than {!val:to_seq} because the conversion from backward lists to forward lists is skipped. *)
(** [to_seq_values t] traverses through the trie [t] in the lexicographical order but only returns the associated data and tags. This is potentially more efficient than {!val:to_seq} because the conversion of paths from backward lists to forward lists is skipped. *)
val to_seq_values : ('data, 'tag) t -> ('data * 'tag) Seq.t

(** [of_seq ~prefix s] inserts bindings [(p, d)] into an empty trie, one by one, using {!val:union_singleton}. Later bindings will shadow previous ones if the paths of bindings are not unique. *)
Expand Down

0 comments on commit 87e95fc

Please sign in to comment.