Monday, May 30, 2011

Factorial using recursion

fact::Int->Int
fact 0 =1
fact x | x >0 = x * fact (x-1)

No comments:

Post a Comment