library(logarr)
This libary module provides extendible arrays with logarithmic access time.
Please note: the atom $
is used to indicate an unset element, and the
functor $/4
is used to indicate a subtree. In general, array
elements whose principal function symbol is $
will not work.
Exported predicates:
is_array(
+A)
alist(
+Array,
-List)
aref(
+Index,
+Array,
-Element)
arefa(
+Index,
+Array,
-Element)
aref/3
, except that it unifies Element with a new array if
Array[Index] is undefined. This is useful for multidimensional
arrays implemented as arrays of arrays.
arefl(
+Index,
+Array,
-Element)
aref/3
, except that Element appears as []
for
undefined cells.
aset(
+Index,
+Array,
+Element,
-NewArray)