3rd implementation of factorial using product, a function in Prelude