fork download
  1. fac(0, 1):-!.
  2. fac(N, Nfac):-
  3. N>0.
  4. M is N-1.
  5. fac(M, Mfac).
  6. Nfac is N*Mfac.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
?-fac(5,X)
compilation info
prog.pl:2-3: warning: singleton variables [Nfac] for fac/2
prog.pl:4: fatal error: redefining built-in predicate (is)/2
compilation failed
stdout
Standard output is empty