General
Material
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5

Solution

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

Back to the exercise.