% appends an element to the beginning of a list.
append_element(X, T, [X|T]).
% append a list to another list to create a combined list,
% by breaking the first list apart, and using append_element.
append_list([], L, L).
append_list([H|T], L, NewList) :-
append_element(H, L, NL),
append_list(T, NL, NL).
当我尝试运行append_list时,
?- append_list([1,2], [3, 4, 5], NL).
我回来假。而不是
NL = [2, 1, 3, 4, 5].
为什么?