diff --git a/src/lib/lists.pl b/src/lib/lists.pl index 3d1cc6a2f..b9866e71c 100644 --- a/src/lib/lists.pl +++ b/src/lib/lists.pl @@ -157,11 +157,17 @@ %% append(Xs0, Xs1, Xs). % -% List Xs is the concatenation of Xs0 and Xs1 +% True if list Xs is the concatenation of Xs0 and Xs1 % % ``` % ?- append([1,2,3], [4,5,6], Xs). % Xs = [1,2,3,4,5,6]. +% ?- append([1,2,3], [4,5,6], [1,2,3,4,5,6]). +% true. +% ?- append("Scr", "yer", "Scryer"). +% true. +% ?- append("Scr", "yer", Xs). +% Xs = "Scryer". % ``` append([], R, R). append([X|L], R, [X|S]) :- append(L, R, S).