deprecate CCVector.rev', renamed into CCVector.rev_in_place

This commit is contained in:
Simon Cruanes 2015-10-21 15:06:00 +02:00
parent 526cda8ecb
commit 41beb03dd0
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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.