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:22: syntax error: . or operator expected after expression
prog.pl:5:22: syntax error: . or operator expected after expression
prog.pl:7: fatal error: redefining built-in predicate suffix/2
compilation failed
stdout
Standard output is empty