
array_list(?Array, ?List)

   Conversion between array and list

Arguments
   Array               Array, i.e. structure with functor []/?, or variable
   List                List, or variable

Type
   Term Manipulation

Description
   Converts lists to arrays and vice versa.  The behaviour is identical to

    array_list(A, L) :- A =.. [[]|L].

   except for error handling.

   The elements in the Array and List are identical and in the same order.


Modes and Determinism
   array_list(+, -) is det
   array_list(-, +) is det

Exceptions
     4 --- Both Array and List are variables (non-coroutining mode only)
     5 --- Array is not an array, or List is not a list

Examples
   
?- array_list([](a,b,c,d,e,f), L).
L = [a,b,c,d,e,f]

?- array_list(A, [a,b,c,d,e,f]),
A = [](a,b,c,d,e,f)

?- array_list([], L).
L = []

?- array_list(A, []),
A = []

?- array_list([]([](a,b),[](c,d)), L).
L = [ [](a,b), [](c,d) ]


See Also
   dim / 2, subscript / 3, array_concat / 3, is_array / 1, array_flat / 3, arg / 3
