From 990b7b7b81d62d16309e744301f39898953d0fe4 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 18 Apr 2017 20:55:03 +0200 Subject: [PATCH] style --- src/core/CCList.mli | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 1c7489de..df85ca5f 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -3,6 +3,12 @@ (** {1 complements to list} *) +type 'a sequence = ('a -> unit) -> unit +type 'a gen = unit -> 'a option +type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] +type 'a printer = Format.formatter -> 'a -> unit +type 'a random_gen = Random.State.t -> 'a + type 'a t = 'a list val empty : 'a t @@ -72,8 +78,9 @@ val init : int -> (int -> 'a) -> 'a t (** Similar to {!Array.init} @since 0.6 *) -val combine : ('a list) -> ('b list) -> ('a * 'b) list -(** Similar to {!List.combine} but tail-recursive +val combine : 'a list -> 'b list -> ('a * 'b) list +(** Similar to {!List.combine} but tail-recursive. + @raise Invalid_argument if the lists have distinct lengths. @since NEXT_RELEASE *) val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int @@ -437,12 +444,6 @@ end (** {2 Conversions} *) -type 'a sequence = ('a -> unit) -> unit -type 'a gen = unit -> 'a option -type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] -type 'a printer = Format.formatter -> 'a -> unit -type 'a random_gen = Random.State.t -> 'a - val random : 'a random_gen -> 'a t random_gen val random_non_empty : 'a random_gen -> 'a t random_gen val random_len : int -> 'a random_gen -> 'a t random_gen