concat a.k.a. append
concat([], L, L).
concat([X|L1], L2, [X|L3]) :- concat(L1, L2, L3).
?- concat([a, b, c], [d, e], X).
X = [a, b, c, d, e]
?- concat(X, [d, e], [a, b, c, d, e]).
X = [a, b, c]
Previous slide
Next slide
Back to first slide
View graphic version