doc: fix small inaccuracy in comments and API

This commit is contained in:
Simon Cruanes 2018-10-13 19:01:39 -05:00
parent b7e8dcb5ff
commit 1d3ba3a6f1
2 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ val filter : ('a -> bool) -> 'a t -> 'a t
val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
(** Safe version of [fold_right]. (** Safe version of [fold_right].
[fold_right f [a1; ...; an] b] is [fold_right f [a1; ...; an] b] is
[f a1 (f a2 (... (f an b) ...))]. Not tail-recursive. *) [f a1 (f a2 (... (f an b) ...))]. *)
val fold_while : ('a -> 'b -> 'a * [`Stop | `Continue]) -> 'a -> 'b t -> 'a val fold_while : ('a -> 'b -> 'a * [`Stop | `Continue]) -> 'a -> 'b t -> 'a
(** Fold until a stop condition via [('a, `Stop)] is (** Fold until a stop condition via [('a, `Stop)] is

View file

@ -50,10 +50,10 @@ val filter : f:('a -> bool) -> 'a t -> 'a t
that satisfy the predicate [p]. The order of the elements that satisfy the predicate [p]. The order of the elements
in the input list is preserved. *) in the input list is preserved. *)
val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val fold_right : f:('a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
(** Safe version of [fold_right]. (** Safe version of [fold_right].
[fold_right f [a1; ...; an] b] is [fold_right f [a1; ...; an] b] is
[f a1 (f a2 (... (f an b) ...))]. Not tail-recursive. *) [f a1 (f a2 (... (f an b) ...))]. *)
val fold_while : f:('a -> 'b -> 'a * [`Stop | `Continue]) -> init:'a -> 'b t -> 'a val fold_while : f:('a -> 'b -> 'a * [`Stop | `Continue]) -> init:'a -> 'b t -> 'a
(** Fold until a stop condition via [('a, `Stop)] is (** Fold until a stop condition via [('a, `Stop)] is