lists:foldl(fun(X,Y) -> X*Y end, 1, lists:seq(1,N)).