% List Concatenation
% rules
append([],Y,Z) :- Y = Z.
append([A|X],Y,Z0) :- Z0=[A|Z], append(X,Y,Z).

/* rules in an expanded form
append(X,Y,Z), '[]'(X) :- Y = Z.
append(X0,Y,Z0), '.'(A,X,X0) :- '.'(A,Z,Z0), append(X,Y,Z).
*/

% initial state
ret=append([1,2,3,4,5], [6,7]).
