Page
Library
Module
Module type
Parameter
Class
Class type
Source
pvec
implements persistent vectors that
n
elements with keys ranging from 0
to n-1
,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.
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.
This library is distributed under the ISC license. See ./LICENSE
.
pvec.mli
and readme