package acgtk
Module PersistentArray.PersistentArraySource
The type of the data structure
This 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.
init 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
make n d returns a persistent array a of length n with d content for all i. Note that addressing starts at 1
of_list_rev l returns a persistent array of size the length pf l and containing its elements in the reverse order
set i v t returns a new persistent array t' equal to t except that t'.(i)=v.
print f t prints the content of t without rerooting it (so the same arrays remain accessible.
print_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.