Haskell Noob
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment