PersistentArray.PersistentArrayThis exception is raised in case a persistent array a_0 has been modified several times, yielding arrays a_1, a_2, ... , a_N, and that a_i is accessed using the get or set functions (with 0 <= i < N) when one tries to access a_j with i < j <= N.
val init : int -> (int -> 'a) -> 'a tinit n f returns a persistent array a of length n such that for all i. a.(i) is set to f i. Note that addressing starts at 1
val make : int -> 'a -> 'a tmake n d returns a persistent array a of length n with d content for all i. Note that addressing starts at 1
val of_list_rev : 'a list -> 'a tof_list_rev l returns a persistent array of size the length pf l and containing its elements in the reverse order
val get : int -> 'a t -> 'aget i t returns the value stored in t at address i starting at 1.
set i v t returns a new persistent array t' equal to t except that t'.(i)=v.
val length : 'a t -> intlength t returns the length of t.
val print : ('a -> string) -> 'a t -> unitprint f t prints the content of t without rerooting it (so the same arrays remain accessible.
val print_and_reroot : ('a -> string) -> 'a t -> unitprint_and_reroot f t prints the content of t and reroots it, so any further modifier version of this array becomes unaccessible.
copy t returns a copy of t, that is, a fresh array containing the same elements as t. t is unchanged.