mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-10 13:13:56 -05:00
add CCVector.ro_vector as a convenience alias
This commit is contained in:
parent
ca4f789967
commit
3ac1eff2af
2 changed files with 6 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ type ('a,'mut) t = {
|
||||||
|
|
||||||
type 'a vector = ('a, rw) t
|
type 'a vector = ('a, rw) t
|
||||||
|
|
||||||
|
type 'a ro_vector = ('a, ro) t
|
||||||
|
|
||||||
let freeze v = {
|
let freeze v = {
|
||||||
size=v.size;
|
size=v.size;
|
||||||
vec=v.vec;
|
vec=v.vec;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ type ('a, 'mut) t
|
||||||
type 'a vector = ('a, rw) t
|
type 'a vector = ('a, rw) t
|
||||||
(** Type synonym: a ['a vector] is mutable. *)
|
(** Type synonym: a ['a vector] is mutable. *)
|
||||||
|
|
||||||
|
type 'a ro_vector = ('a, ro) t
|
||||||
|
(** Alias for immutable vectors.
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
type 'a sequence = ('a -> unit) -> unit
|
type 'a sequence = ('a -> unit) -> unit
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue