diff --git a/core/CCArray.mli b/core/CCArray.mli index a162f28f..e3cf6dac 100644 --- a/core/CCArray.mli +++ b/core/CCArray.mli @@ -72,12 +72,12 @@ module type S = sig val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option (** Like {!find}, but also pass the index to the predicate function. - @since 0.4 *) + @since 0.3.4 *) val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option (** [find p x] returns [Some (i,x)] where [x] is the [i]-th element of [l], and [p x] holds. Otherwise returns [None] - @since 0.4 *) + @since 0.3.4 *) val lookup : ?cmp:'a ord -> 'a -> 'a t -> int option (** Lookup the index of some value in a sorted array. diff --git a/core/CCList.mli b/core/CCList.mli index 21e1f63a..6f62288e 100644 --- a/core/CCList.mli +++ b/core/CCList.mli @@ -103,7 +103,7 @@ val find : ('a -> 'b option) -> 'a t -> 'b option val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option (** Like {!find}, but also pass the index to the predicate function. - @since 0.4 *) + @since 0.3.4 *) val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option (** [find p x] returns [Some (i,x)] where [x] is the [i]-th element of [l], diff --git a/core/CCOpt.mli b/core/CCOpt.mli index 2e810568..068631fa 100644 --- a/core/CCOpt.mli +++ b/core/CCOpt.mli @@ -67,7 +67,7 @@ val filter : ('a -> bool) -> 'a t -> 'a t val get : 'a -> 'a t -> 'a (** [get default x] unwraps [x], but if [x = None] it returns [default] instead. - @since 0.5 *) + @since 0.4.1 *) val get_exn : 'a t -> 'a (** Open the option, possibly failing if it is [None] diff --git a/core/CCSequence.mli b/core/CCSequence.mli index cd4084b3..0c5fa9a6 100644 --- a/core/CCSequence.mli +++ b/core/CCSequence.mli @@ -78,25 +78,25 @@ val singleton : 'a -> 'a t val doubleton : 'a -> 'a -> 'a t (** Sequence with exactly two elements - @since 0.4 *) + @since 0.3.4 *) val cons : 'a -> 'a t -> 'a t (** [cons x l] yields [x], then yields from [l]. Same as [append (singleton x) l] - @since 0.4 *) + @since 0.3.4 *) val snoc : 'a t -> 'a -> 'a t (** Same as {!cons} but yields the element after iterating on [l] - @since 0.4 *) + @since 0.3.4 *) val return : 'a -> 'a t (** Synonym to {!singleton} - @since 0.4 *) + @since 0.3.4 *) val pure : 'a -> 'a t (** Synonym to {!singleton} - @since 0.4 *) + @since 0.3.4 *) val repeat : 'a -> 'a t (** Infinite sequence of the same element. You may want to look @@ -146,11 +146,11 @@ val exists : ('a -> bool) -> 'a t -> bool val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool (** Is the value a member of the sequence? @param eq the equality predicate to use (default [(=)]) - @since 0.4 *) + @since 0.3.4 *) val find : ('a -> 'b option) -> 'a t -> 'b option (** Find the first element on which the function doesn't return [None] - @since 0.4 *) + @since 0.3.4 *) val length : 'a t -> int (** How long is the sequence? Forces the sequence. *) @@ -179,14 +179,14 @@ val flatMap : ('a -> 'b t) -> 'a t -> 'b t val flat_map : ('a -> 'b t) -> 'a t -> 'b t (** Alias to {!flatMap} with a more explicit name - @since 0.4 *) + @since 0.3.4 *) val fmap : ('a -> 'b option) -> 'a t -> 'b t (** Specialized version of {!flatMap} for options. *) val filter_map : ('a -> 'b option) -> 'a t -> 'b t (** Alias to {!fmap} with a more explicit name - @since 0.4 *) + @since 0.3.4 *) val intersperse : 'a -> 'a t -> 'a t (** Insert the single element between every element of the sequence *) @@ -210,7 +210,7 @@ val persistent_lazy : 'a t -> 'a t is interrupted prematurely ({!take}, etc.) then [s'] will not be memorized, and the next call to [s'] will traverse [s] again. - @since 0.4 *) + @since 0.3.4 *) (** {2 Misc} *) @@ -237,7 +237,7 @@ val product : 'a t -> 'b t -> ('a * 'b) t val product2 : 'a t -> 'b t -> ('a, 'b) t2 (** Binary version of {!product}. Same requirements. - @since 0.4 *) + @since 0.3.4 *) val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t (** [join ~join_row a b] combines every element of [a] with every @@ -264,12 +264,12 @@ val min : ?lt:('a -> 'a -> bool) -> 'a t -> 'a option val head : 'a t -> 'a option (** First element, if any, otherwise [None] - @since 0.4 *) + @since 0.3.4 *) val head_exn : 'a t -> 'a (** First element, if any, fails @raise Invalid_argument if the sequence is empty - @since 0.4 *) + @since 0.3.4 *) val take : int -> 'a t -> 'a t (** Take at most [n] elements from the sequence. Works on infinite @@ -279,14 +279,14 @@ val take_while : ('a -> bool) -> 'a t -> 'a t (** Take elements while they satisfy the predicate, then stops iterating. Will work on an infinite sequence [s] if the predicate is false for at least one element of [s]. - @since 0.4 *) + @since 0.3.4 *) val drop : int -> 'a t -> 'a t (** Drop the [n] first elements of the sequence. Lazy. *) val drop_while : ('a -> bool) -> 'a t -> 'a t (** Predicate version of {!drop} - @since 0.4 *) + @since 0.3.4 *) val rev : 'a t -> 'a t (** Reverse the sequence. O(n) memory and time, needs the @@ -331,12 +331,12 @@ val of_list : 'a list -> 'a t val on_list : ('a t -> 'b t) -> 'a list -> 'b list (** [on_list f l] is equivalent to [to_list @@ f @@ of_list l]. - @since 0.4 + @since 0.3.4 *) val to_opt : 'a t -> 'a option (** Alias to {!head} - @since 0.4 *) + @since 0.3.4 *) val to_array : 'a t -> 'a array (** Convert to an array. Currently not very efficient because @@ -355,7 +355,7 @@ val array_slice : 'a array -> int -> int -> 'a t val of_opt : 'a option -> 'a t (** Iterate on 0 or 1 values. - @since 0.4 *) + @since 0.3.4 *) val of_stream : 'a Stream.t -> 'a t (** Sequence of elements of a stream (usable only once) *) @@ -404,7 +404,7 @@ val to_str : char t -> string val concat_str : string t -> string (** Concatenate strings together, eagerly. Also see {!intersperse} to add a separator. - @since 0.4 *) + @since 0.3.4 *) exception OneShotSequence (** Raised when the user tries to iterate several times on @@ -457,10 +457,10 @@ module Set : sig val to_seq : t -> elt sequence val to_list : t -> elt list - (** @since 0.4 *) + (** @since 0.3.4 *) val of_list : elt list -> t - (** @since 0.4 *) + (** @since 0.3.4 *) end (** Create an enriched Set module from the given one *) @@ -481,10 +481,10 @@ module Map : sig val values : 'a t -> 'a sequence val to_list : 'a t -> (key * 'a) list - (** @since 0.4 *) + (** @since 0.3.4 *) val of_list : (key * 'a) list -> 'a t - (** @since 0.4 *) + (** @since 0.3.4 *) end (** Adapt a pre-existing Map module to make it sequence-aware *) @@ -526,19 +526,19 @@ module Infix : sig val (>>=) : 'a t -> ('a -> 'b t) -> 'b t (** Monadic bind (infix version of {!flat_map} - @since 0.4 *) + @since 0.3.4 *) val (>|=) : 'a t -> ('a -> 'b) -> 'b t (** Infix version of {!map} - @since 0.4 *) + @since 0.3.4 *) val (<*>) : ('a -> 'b) t -> 'a t -> 'b t (** Applicative operator (product+application) - @since 0.4 *) + @since 0.3.4 *) val (<+>) : 'a t -> 'a t -> 'a t (** Concatenation of sequences - @since 0.4 *) + @since 0.3.4 *) end include module type of Infix @@ -576,7 +576,7 @@ By chunks of [4096] bytes: Sequence.IO.(chunks_of ~size:4096 "a" |> write_to "b");; ]} -@since 0.4 *) +@since 0.3.4 *) module IO : sig val lines_of : ?mode:int -> ?flags:open_flag list -> diff --git a/core/CCSexp.mli b/core/CCSexp.mli index 596a08be..09de18e6 100644 --- a/core/CCSexp.mli +++ b/core/CCSexp.mli @@ -252,11 +252,11 @@ Sexp.Traverse.list_all pt_of_sexp sexp;; module Traverse : sig type 'a conv = t -> 'a option (** A converter from S-expressions to 'a is a function [sexp -> 'a option]. - @since 0.5 *) + @since 0.4.1 *) val map_opt : ('a -> 'b option) -> 'a list -> 'b list option (** Map over a list, failing as soon as the function fails on any element - @since 0.5 *) + @since 0.4.1 *) val list_any : 'a conv -> t -> 'a option (** [list_any f (List l)] tries [f x] for every element [x] in [List l], @@ -284,19 +284,19 @@ module Traverse : sig val to_list_with : (t -> 'a option) -> 'a list conv (** Expect a list, applies [f] to all the elements of the list, and succeeds only if [f] succeeded on every element - @since 0.5 *) + @since 0.4.1 *) val to_pair : (t * t) conv (** Expect a list of two elements *) val to_pair_with : 'a conv -> 'b conv -> ('a * 'b) conv (** Same as {!to_pair} but applies conversion functions - @since 0.5 *) + @since 0.4.1 *) val to_triple : (t * t * t) conv val to_triple_with : 'a conv -> 'b conv -> 'c conv -> ('a * 'b * 'c) conv - (* @since 0.5 *) + (* @since 0.4.1 *) val get_field : string -> t conv (** [get_field name e], when [e = List [(n1,x1); (n2,x2) ... ]], extracts @@ -314,7 +314,7 @@ module Traverse : sig (** [field_list name f "(... (name a b c d) ...record)"] will look for a field based on the given [name], and expect it to have a list of arguments dealt with by [f] (here, "a b c d"). - @since 0.5 *) + @since 0.4.1 *) val (>>=) : 'a option -> ('a -> 'b option) -> 'b option