Skip to content

Instantly share code, notes, and snippets.

Last active Jan 28, 2019
What would you like to do?
Factorial function in Haskell.
--Factorial function, short/standard version.
fact 0 = 1
fact n = n * fact (n - 1)
main = do
print (fact 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment