package tezos-lazy-containers

  1. Overview
  2. Docs

A lazy vector is a fixed-size key-value association where each value is created dynamically.

In many ways this data structure mimics an array, but its lookup has logarithmic time complexity and it supports non-int keys.

exception Bounds
exception SizeOverflow
module type KeyS = sig ... end

KeyS is the qualifier signature for key types in the lazy vector. Externally visible and accessible keys of the lazy vector are always non-negative. However, the lazy vector implementation may internally use negative keys therefore modules of type KeyS must support them.

module type S = sig ... end
module Make (Key : KeyS) : S with type key = Key.t
module IntVector : S with type key = int
module Int32Vector : S with type key = int32
module Int64Vector : S with type key = int64
module ZVector : S with type key = Z.t
module Mutable : sig ... end

Make generates a lazy vector module using a given Key module.