% app3(Xs, Ys, Zs, Us) :- Us is the result of concatenating the lists Xs, Ys and Zs app3(Xs, Ys, Zs, Us) :- app(Xs, Ys, Vs), app(Vs, Zs, Us). % augmented by the APPEND program app([], Ys, Ys). app([X | Xs], Ys, [X | Zs]) :- app(Xs, Ys, Zs).