summaryrefslogtreecommitdiff
path: root/stdlib/listLabels.mli
diff options
context:
space:
mode:
authorRichard Degenne <richdeg2@gmail.com>2017-02-08 17:45:27 +0100
committeralainfrisch <alain@frisch.fr>2017-02-28 14:35:33 +0100
commitc49f12361b85e4723c938d395e6d6bab3faaf652 (patch)
treef29ba5ddd76af2874ec2d5887c9b6c746106c7e8 /stdlib/listLabels.mli
parent4ea470feb10e2e1a85c2565d640a47fe9dc9a8e3 (diff)
downloadocaml-c49f12361b85e4723c938d395e6d6bab3faaf652.tar.gz
Implemented `List.init`
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 98fe2a0579..788e32a449 100644
--- a/stdlib/listLabels.mli
+++ b/stdlib/listLabels.mli
@@ -73,6 +73,13 @@ val nth_opt: 'a list -> int -> 'a option
val rev : 'a list -> 'a list
(** List reversal. *)
+val init : len:int -> f:(int -> 'a) -> 'a list
+(** [List.init len f] is [f 0; f 1; ...; f (len-1)], evaluated left to right.
+
+ @raise Invalid_argument if [len < 0].
+ @since 4.06.0
+*)
+
val append : 'a list -> 'a list -> 'a list
(** Catenate two lists. Same function as the infix operator [@].
Not tail-recursive (length of the first argument). The [@]