Skip to content

Commit 1fd377e

Browse files
committed
CCArray(cleanup): remove function always present on 4.08
1 parent 2fda76a commit 1fd377e

File tree

3 files changed

+1
-41
lines changed

3 files changed

+1
-41
lines changed

src/core/CCArray.ml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,6 @@ let pp_i ?(pp_start = fun _ () -> ()) ?(pp_stop = fun _ () -> ())
455455
let to_string ?(sep = ", ") item_to_string a =
456456
Array.to_list a |> List.map item_to_string |> String.concat sep
457457
458-
let to_seq a =
459-
let rec aux i () =
460-
if i >= length a then
461-
Seq.Nil
462-
else
463-
Seq.Cons (a.(i), aux (i + 1))
464-
in
465-
aux 0
466-
467458
let to_iter a k = iter k a
468459
469460
let to_gen a =

src/core/CCArray.mli

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,6 @@ val to_iter : 'a t -> 'a iter
240240
in modification of the iterator.
241241
@since 2.8 *)
242242

243-
val to_seq : 'a t -> 'a Seq.t
244-
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
245-
The input array [a] is shared with the sequence and modification of it will result
246-
in modification of the sequence.
247-
Renamed from [to_std_seq] since 3.0.
248-
@since 3.0
249-
*)
250-
251243
val to_gen : 'a t -> 'a gen
252244
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
253245

src/core/CCArrayLabels.mli

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,6 @@ val fold2 : f:('acc -> 'a -> 'b -> 'acc) -> init:'acc -> 'a t -> 'b t -> 'acc
219219
@raise Invalid_argument if [a] and [b] have distinct lengths.
220220
@since 0.20 *)
221221

222-
val iter2 : f:('a -> 'b -> unit) -> 'a t -> 'b t -> unit
223-
(** [iter2 ~f a b] iterates on the two arrays [a] and [b] stepwise.
224-
It is equivalent to [f a0 b0; …; f a.(length a - 1) b.(length b - 1); ()].
225-
226-
@raise Invalid_argument if [a] and [b] have distinct lengths.
227-
@since 0.20 *)
228-
229222
val shuffle : 'a t -> unit
230223
(** [shuffle a] randomly shuffles the array [a], in place. *)
231224

@@ -248,14 +241,6 @@ val to_iter : 'a t -> 'a iter
248241
in modification of the iterator.
249242
@since 2.8 *)
250243

251-
val to_seq : 'a t -> 'a Seq.t
252-
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
253-
The input array [a] is shared with the sequence and modification of it will result
254-
in modification of the sequence.
255-
Renamed from [to_std_seq] since 3.0.
256-
@since 3.0
257-
*)
258-
259244
val to_gen : 'a t -> 'a gen
260245
(** [to_gen a] returns a [gen] of the elements of an array [a]. *)
261246

@@ -286,14 +271,6 @@ val pp_i :
286271
By defaults [pp_start] and [pp_stop] does nothing and [pp_sep] defaults to
287272
(fun out -> Format.fprintf out ",@ "). *)
288273

289-
val map2 : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
290-
(** [map2 ~f a b] applies function [f] to all elements of [a] and [b],
291-
and builds an array with the results returned by [f]:
292-
[[| f a.(0) b.(0); …; f a.(length a - 1) b.(length b - 1)|]].
293-
294-
@raise Invalid_argument if [a] and [b] have distinct lengths.
295-
@since 0.20 *)
296-
297274
val rev : 'a t -> 'a t
298275
(** [rev a] copies the array [a] and reverses it in place.
299276
@since 0.20 *)
@@ -308,7 +285,7 @@ val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
308285
element of [a] is discarded. *)
309286

310287
val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
311-
(** [monoid_product ~f a b] passes all combinaisons of tuples from the two arrays [a] and [b]
288+
(** [monoid_product ~f a b] passes all combinaisons of tuples from the two arrays [a] and [b]
312289
to the function [f].
313290
@since 2.8 *)
314291

0 commit comments

Comments
 (0)