1Misc.Stdlib.List(3)              OCaml library             Misc.Stdlib.List(3)
2
3
4

NAME

6       Misc.Stdlib.List - no description
7

Module

9       Module   Misc.Stdlib.List
10

Documentation

12       Module List
13        : sig end
14
15
16
17
18
19
20
21       type 'a t = 'a list
22
23
24
25
26
27       val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
28
29       The  lexicographic  order supported by the provided order.  There is no
30       constraint on the relative lengths of the lists.
31
32
33
34       val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
35
36       Returns true iff the given lists have the same length and content  with
37       respect to the given equality function.
38
39
40
41       val filter_map : ('a -> 'b option) -> 'a t -> 'b t
42
43
44       filter_map  f  l applies f to every element of l , filters out the None
45       elements and returns the list of the arguments of the Some elements.
46
47
48
49       val some_if_all_elements_are_some : 'a option t -> 'a t option
50
51       If all elements of the given list are Some _ then Some xs  is  returned
52       with  the  xs being the contents of those Some s, with order preserved.
53       Otherwise return None .
54
55
56
57       val map2_prefix : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t * 'b t
58
59
60       let r1, r2 = map2_prefix f l1 l2 If l1 is of length n and l2 = h2 @  t2
61       with h2 of length n, r1 is List.map2 f l1 h1 and r2 is t2.
62
63
64
65       val split_at : int -> 'a t -> 'a t * 'a t
66
67
68       split_at n l returns the pair before, after where before is the n first
69       elements of l and after the remaining ones.  If l has less than n  ele‐
70       ments, raises Invalid_argument.
71
72
73
74
75
76OCamldoc                          2019-02-02               Misc.Stdlib.List(3)
Impressum