Scheme Exercises

back to exercise list       previous     next

Group:     Exercise: 1/48 

Factorial:  The archetypical recursive function.

Create a function called "fact" which, given a single positive integer argument,
will return the factorial of that integer. Remember that the factorial of a number
like 4 is the product of all of the numbers from 1 to 4, namely 1*2*3*4 = 24
So, for instance: (fact 4) => 24, and (fact 1) => 1.