Created
December 1, 2022 02:48
-
-
Save vhxs/1897d415c286fad26f7c40728df69085 to your computer and use it in GitHub Desktop.
baby's first Haskell program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Factorial recursively defined in Haskell | |
fac n = if n == 0 then 1 else n * fac (n-1) | |
main = print (fac 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment