Add an implementation of the factorial algorithm in Haskell.
authorSimon Peyote Joints <[email protected]>
Wed, 19 Mar 2008 21:09:41 +0000 (19 22:09 +0100)
committerSimon Peyote Joints <[email protected]>
Wed, 19 Mar 2008 21:15:00 +0000 (19 22:15 +0100)
Fact.hs [new file with mode: 0644]

diff --git a/Fact.hs b/Fact.hs
new file mode 100644 (file)
index 0000000..491ffc9
--- /dev/null
+++ b/Fact.hs
@@ -0,0 +1,2 @@
+fact 0 = 1
+fact n = n * (fact (n - 1))