The module array1 in directory lib provides a very simple backtrackable array implementation. The predicates through which the array objects are manipulated are:
A small example that shows the use of these predicates is the following:
| ?- import [array_new/2, array_elt/3, array_update/4] from array1. yes | ?- array_new(A, 4), array_update(A,1,1,B), array_update(B,2,2,C), ( array_update(C,3,3,D), array_elt(D,3,E) ; array_update(C,3,6,D), array_elt(D,3,E) ; array_update(C,3,7,D), array_elt(D,3,E) ). A = array(1,2,3,_874600) B = array(1,2,3,_874600) C = array(1,2,3,_874600) D = array(1,2,3,_874600) E = 3; A = array(1,2,6,_874600) B = array(1,2,6,_874600) C = array(1,2,6,_874600) D = array(1,2,6,_874600) E = 6; A = array(1,2,7,_874600) B = array(1,2,7,_874600) C = array(1,2,7,_874600) D = array(1,2,7,_874600) E = 7; no