prefix(X,[],X).
prefix(X,[H|Y],Z) :- prefix(X,H,[X,H]).
suffix([],X,X).
suffix(X,[H|Y],Z) :- suffix(H,X,[H,X]).
suffix(X,[1,2]).
cHJlZml4KFgsW10sWCkuCnByZWZpeChYLFtIfFldLFopIDotIHByZWZpeChYLEgsW1gsSF0pLgoKc3VmZml4KFtdLFgsWCkuCnN1ZmZpeChYLFtIfFldLFopIDotIHN1ZmZpeChILFgsW0gsWF0pLgoKc3VmZml4KFgsWzEsMl0pLgo=
prog.pl:2: warning: singleton variables [Y,Z] for prefix/3
prog.pl:5: warning: singleton variables [Y,Z] for suffix/3
prog.pl:7: fatal error: redefining built-in predicate suffix/2
compilation failed