package vec

  1. Overview
  2. Docs
Fast, safe mutable dynamic arrays

Install

Dune Dependency

Authors

Maintainers

Sources

v0.1.0.tar.gz
md5=157959d653f09b034b539adb0ad3f233
sha512=84a9e8c103b14673ae13f5510c20c7550529d7a4a453ea62917d387bcb3e641868e99a4832517e855187dfeddc6f70ebb8298d75e0c8365bfb5016b94a070c1f

Description

This library provides efficient dynamic arrays with Rust-like mutability permissions.

Published: 05 Oct 2020

README

vec

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 build the project, run the following in the root of the repository:

dune build
dune install

To uninstall, run dune uninstall in the root of the repository.

License

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

Dependencies (2)

  1. ocaml >= "4.08.0"
  2. dune >= "2.4"

Dev Dependencies

None

Used by (1)

  1. pa_ppx_ag

Conflicts

None

OCaml

Innovation. Community. Security.