fork download
  1. prefix(X,[],X).
  2. prefix(X,[H|Y],Z) :- prefix(X,H,[X,H]).
  3.  
  4. suffix([],X,X).
  5. suffix(X,[H|Y],Z) :- suffix(H,X,[H,X]).
  6.  
  7. suffix(_X,[1,2,3]).
  8.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty