I\'m having trouble understanding the following factorial program
fact1(0,Result) :- Result is 1. fact1(N,Result) :- N > 0, N1 is N-1, fac
factorial(1, 1). factorial(N, Result) :- M is N - 1, factorial(M, NextResult), Result is NextResult * N.