Assignment 1: Factorial and its applications

Write SML function (recursive) to compute the factorial and use in the computation of the following.