domains l=integer ls=l* predicates pot(l, l, l) clauses pot(_, 0, 1). pot(N, M, W):-M1=M-1, pot(N, M1, W1), W=W1*N.