
myappend([], Y, Y). 
myappend([A|B], Y, [A|W]) :- myappend(B,Y,W). 


/* queries */ 
/* myappend([a,b], [c,d], [a,b,c,d]).
myappend([a,b], [c,d], Z). 
myappend([a,b], Y, [a,b,c,d]).
myappend(X, [c,d], [a,b,c,d]). 
myappend(X, [d,c], [a,b,c,d]). */ 


