summaryrefslogtreecommitdiff
path: root/stdlib/listLabels.mli
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2019-10-01 16:53:14 +0200
committerThomas Refis <thomas.refis@gmail.com>2019-10-01 15:53:14 +0100
commitba90da42ac4521fa727c2edc55b2085c9aa29712 (patch)
treee7c368c17ac371b72f5bc98644cc11d4938e74ff /stdlib/listLabels.mli
parentc82405b7a012be303be088fb8eff6b15626e8fdb (diff)
downloadocaml-ba90da42ac4521fa727c2edc55b2085c9aa29712.tar.gz
List.concat_map : ('a -> 'b list) -> 'a list -> 'b list (#8760)
Diffstat (limited to 'stdlib/listLabels.mli')
-rw-r--r--stdlib/listLabels.mli7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/listLabels.mli b/stdlib/listLabels.mli
index dce1e458e3..64fbff8723 100644
--- a/stdlib/listLabels.mli
+++ b/stdlib/listLabels.mli
@@ -143,6 +143,13 @@ val filter_map : f:('a -> 'b option) -> 'a list -> 'b list
@since 4.08.0
*)
+val concat_map : f:('a -> 'b list) -> 'a list -> 'b list
+(** [List.concat_map f l] gives the same result as
+ {!List.concat}[ (]{!List.map}[ f l)]. Tail-recursive.
+
+ @since 4.10.0
+*)
+
val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b list -> 'a
(** [List.fold_left f a [b1; ...; bn]] is
[f (... (f (f a b1) b2) ...) bn]. *)