Persistent vectors for OCaml

pvec implements persistent vectors that

Until recently I tried using lists until it stopped making sense, then transitioned to arrays where I had to. The mutable nature of arrays often introduced bugs. In some sense, I was trading speed for safety.

With persistent vectors I can have the best of both worlds. In many cases they strike a good balance between safety and speed.

Documentation

The pvec library exposes a single module Pvec. You can explore its interface online.

This documentation is derived from the main branch on Github. You might have obtained a different version of the library from Opam.

If you're interested in the underlying data-structure, I recommend reading hyPiRion's series of blog posts.

License

This library is distributed under the ISC license. See ./LICENSE.

Progress