mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
CCArray(cleanup): remove function always present on 4.08
This commit is contained in:
parent
2fda76a5f7
commit
1fd377e5c1
3 changed files with 1 additions and 41 deletions
|
|
@ -455,15 +455,6 @@ let pp_i ?(pp_start = fun _ () -> ()) ?(pp_stop = fun _ () -> ())
|
||||||
let to_string ?(sep = ", ") item_to_string a =
|
let to_string ?(sep = ", ") item_to_string a =
|
||||||
Array.to_list a |> List.map item_to_string |> String.concat sep
|
Array.to_list a |> List.map item_to_string |> String.concat sep
|
||||||
|
|
||||||
let to_seq a =
|
|
||||||
let rec aux i () =
|
|
||||||
if i >= length a then
|
|
||||||
Seq.Nil
|
|
||||||
else
|
|
||||||
Seq.Cons (a.(i), aux (i + 1))
|
|
||||||
in
|
|
||||||
aux 0
|
|
||||||
|
|
||||||
let to_iter a k = iter k a
|
let to_iter a k = iter k a
|
||||||
|
|
||||||
let to_gen a =
|
let to_gen a =
|
||||||
|
|
|
||||||
|
|
@ -240,14 +240,6 @@ val to_iter : 'a t -> 'a iter
|
||||||
in modification of the iterator.
|
in modification of the iterator.
|
||||||
@since 2.8 *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
|
||||||
The input array [a] is shared with the sequence and modification of it will result
|
|
||||||
in modification of the sequence.
|
|
||||||
Renamed from [to_std_seq] since 3.0.
|
|
||||||
@since 3.0
|
|
||||||
*)
|
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
|
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -219,13 +219,6 @@ val fold2 : f:('acc -> 'a -> 'b -> 'acc) -> init:'acc -> 'a t -> 'b t -> 'acc
|
||||||
@raise Invalid_argument if [a] and [b] have distinct lengths.
|
@raise Invalid_argument if [a] and [b] have distinct lengths.
|
||||||
@since 0.20 *)
|
@since 0.20 *)
|
||||||
|
|
||||||
val iter2 : f:('a -> 'b -> unit) -> 'a t -> 'b t -> unit
|
|
||||||
(** [iter2 ~f a b] iterates on the two arrays [a] and [b] stepwise.
|
|
||||||
It is equivalent to [f a0 b0; …; f a.(length a - 1) b.(length b - 1); ()].
|
|
||||||
|
|
||||||
@raise Invalid_argument if [a] and [b] have distinct lengths.
|
|
||||||
@since 0.20 *)
|
|
||||||
|
|
||||||
val shuffle : 'a t -> unit
|
val shuffle : 'a t -> unit
|
||||||
(** [shuffle a] randomly shuffles the array [a], in place. *)
|
(** [shuffle a] randomly shuffles the array [a], in place. *)
|
||||||
|
|
||||||
|
|
@ -248,14 +241,6 @@ val to_iter : 'a t -> 'a iter
|
||||||
in modification of the iterator.
|
in modification of the iterator.
|
||||||
@since 2.8 *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
|
||||||
The input array [a] is shared with the sequence and modification of it will result
|
|
||||||
in modification of the sequence.
|
|
||||||
Renamed from [to_std_seq] since 3.0.
|
|
||||||
@since 3.0
|
|
||||||
*)
|
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
|
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
|
||||||
|
|
||||||
|
|
@ -286,14 +271,6 @@ val pp_i :
|
||||||
By defaults [pp_start] and [pp_stop] does nothing and [pp_sep] defaults to
|
By defaults [pp_start] and [pp_stop] does nothing and [pp_sep] defaults to
|
||||||
(fun out -> Format.fprintf out ",@ "). *)
|
(fun out -> Format.fprintf out ",@ "). *)
|
||||||
|
|
||||||
val map2 : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
|
||||||
(** [map2 ~f a b] applies function [f] to all elements of [a] and [b],
|
|
||||||
and builds an array with the results returned by [f]:
|
|
||||||
[[| f a.(0) b.(0); …; f a.(length a - 1) b.(length b - 1)|]].
|
|
||||||
|
|
||||||
@raise Invalid_argument if [a] and [b] have distinct lengths.
|
|
||||||
@since 0.20 *)
|
|
||||||
|
|
||||||
val rev : 'a t -> 'a t
|
val rev : 'a t -> 'a t
|
||||||
(** [rev a] copies the array [a] and reverses it in place.
|
(** [rev a] copies the array [a] and reverses it in place.
|
||||||
@since 0.20 *)
|
@since 0.20 *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue