mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
deprecate CCVector.rev', renamed into CCVector.rev_in_place
This commit is contained in:
parent
526cda8ecb
commit
41beb03dd0
2 changed files with 9 additions and 3 deletions
|
|
@ -562,7 +562,7 @@ let (>>=) x f = flat_map f x
|
|||
|
||||
let (>|=) x f = map f x
|
||||
|
||||
let rev' v =
|
||||
let rev_in_place v =
|
||||
if v.size > 0
|
||||
then (
|
||||
let n = v.size in
|
||||
|
|
@ -575,9 +575,11 @@ let rev' v =
|
|||
done
|
||||
)
|
||||
|
||||
let rev' = rev_in_place
|
||||
|
||||
let rev v =
|
||||
let v' = copy v in
|
||||
rev' v';
|
||||
rev_in_place v';
|
||||
v'
|
||||
|
||||
(*$T
|
||||
|
|
|
|||
|
|
@ -225,8 +225,12 @@ val remove : ('a, rw) t -> int -> unit
|
|||
val rev : ('a,_) t -> ('a, 'mut) t
|
||||
(** Reverse the vector *)
|
||||
|
||||
val rev_in_place : ('a, rw) t -> unit
|
||||
(** Reverse the vector in place
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val rev' : ('a, rw) t -> unit
|
||||
(** Reverse the vector in place *)
|
||||
(** @deprecated old name for {!rev_in_place} *)
|
||||
|
||||
val rev_iter : ('a -> unit) -> ('a,_) t -> unit
|
||||
(** [rev_iter f a] is the same as [iter f (rev a)], only more efficient.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue