Solution
%% If the list L can be constructed by concatenating P with something, %% then P is a prefix of L. prefix(P,L) :- append(P,_,L).
Solution
%% If the list L can be constructed by concatenating P with something, %% then P is a prefix of L. prefix(P,L) :- append(P,_,L). |