Compare commits

...

4 commits

Author SHA1 Message Date
猗露
81f7628385
Merge fd1495324a into 4294dc7ca3 2025-01-30 02:12:58 +00:00
猗露
fd1495324a add benchmark 2025-01-30 10:07:48 +08:00
猗露
765a8da876 update docs 2025-01-30 09:37:57 +08:00
Adlertz, Niclas
4294dc7ca3 Add square brackets in comment for CCList.return
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-01-28 22:19:11 -05:00
4 changed files with 6 additions and 4 deletions

View file

@ -1153,12 +1153,14 @@ module Iter_ = struct
let bench_to_array n =
let iter () = Iter.to_array Iter.(1 -- n)
and gen () = Gen.to_array Gen.(1 -- n)
and oseq () = OSeq.to_array OSeq.(1 -- n) in
and oseq () = OSeq.to_array OSeq.(1 -- n)
and of_iter () = CCArray.of_iter Iter.(1 -- n) in
B.throughputN 3 ~repeat
[
"iter.to_array", iter, ();
"gen.to_array", gen, ();
"oseq.to_array", oseq, ();
"ccarray.of_iter", of_iter, ();
]
let bench_cons n =

View file

@ -243,7 +243,7 @@ val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
(** [of_iter iter] builds a array from a given [iter].
In the result, elements appear in the same order as they did in the source [iter].
@since 3.15 *)
@since NEXT_RELEASE *)
val to_seq : 'a t -> 'a Seq.t
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].

View file

@ -251,7 +251,7 @@ val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
(** [of_iter iter] builds a array from a given [iter].
In the result, elements appear in the same order as they did in the source [iter].
@since 3.15 *)
@since NEXT_RELEASE *)
val to_seq : 'a t -> 'a Seq.t
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].

View file

@ -384,7 +384,7 @@ val mguard : bool -> unit t
@since 3.1 *)
val return : 'a -> 'a t
(** [return x] is [x]. *)
(** [return x] is [[x]]. *)
val take : int -> 'a t -> 'a t
(** [take n l] takes the [n] first elements of the list [l], drop the rest. *)