vec

Fast, safe mutable dynamic arrays
README

Fast, safe mutable dynamic arrays for OCaml.

You can find API documentation here.

Summary

The idea behind this library is to provide efficient, mutable dynamic arrays with Rust-like mutability permissions.

To achieve this, the Vec.t type uses a polymorphic variant as a phantom type parameter, which is [`R | `W] for read-write vectors,
[`R] for read-only vectors, or [`W] for write-only vectors.

All functions defined in the Vec module are polymorphic in this type parameter, only requiring it to contain each function's needed capability.

For example, functions that only read data from a vector accept a ('a, [> `R]) Vec.t parameter,
so both [`R] vectors and [`R | `W] vectors can be passed.

Installing

The package can be found on OPAM here.

To install it, run:

opam install vec

Building from source

To build the project and run the test suite, run the following in the root of the repository:

dune build @doc @runtest

License

This repository is licensed under the terms of the MIT License.
For more details, see the license file.

Install
Published
05 Jun 2021
Sources
v0.3.0.tar.gz
md5=a20e2d8408a96e76f10349b9a4f3ac88
sha512=ca7b54ae412d5a95c66843bdec0ca5436216e55052fba463d29e7a813ba5b9b1af0e54024b95baccb6c75dd0c42cb74c3e0c8aa5a52abb8d71b344cb2d171054
Dependencies
ounit2
with-test
odoc
with-doc
ocaml
>= "4.08.0"
dune
>= "2.8"
Reverse Dependencies