% CPSC 312
% Author: Steven Wolfman
% Released into the public domain

% my_prefix(PreList, List) is true when the elements of
% PreList appear at the start of List, where both PreList 
% and List are lists represented as empty and cons(X, Y).
my_prefix(empty, _).
my_prefix(cons(Elt, PreRest), cons(Elt, Rest)) :- 
    my_prefix(PreRest, Rest).
