Give recursive definition in Prolog :
Define a predicate prod(L, N) which takes a list L of numbers and calculates the product N of the numbers in the list.
I have found a way that works for the sum :
sum([],0).
sum([X|L],N) :- sum(L,N1),N is N1 + X.
Please help me. I have been trying for a long time and it still isn't working.