The definition of this Prolog library predicate is:
append([],X,X). append([X|L1],L2,[X|L3]):- append(L1,L2,L3).The following should be noted:
1. This predicate does not perform any type testing functions.
2. This predicate is not protected by ECLiPSe and may be redefined without generating a warning message.
Success: append([1,2],L2,[1,2,3,4]). (gives L2=[3,4]). append([1,B],L2,[A,2,3,4]). (gives B=2 L2=[3,4] A=1). append([1,2],L2,L3). (gives L2=_g70 L3=[1,2|_g70]). append([1]),[2,3]),L3). (gives L3=[1,2,3]). [eclipse]: append(L1,L2,[1,2]), writeln((L1,L2)), fail. [] , [1, 2] [1] , [2] [1, 2] , [] no (more) solution. Fail: append(L1,[3],[1,2,3,4]). append(1,L2,[1,2]).