Skip to content

Instantly share code, notes, and snippets.

@vhxs
Created December 1, 2022 02:48
Show Gist options
  • Save vhxs/1897d415c286fad26f7c40728df69085 to your computer and use it in GitHub Desktop.
Save vhxs/1897d415c286fad26f7c40728df69085 to your computer and use it in GitHub Desktop.
baby's first Haskell program
-- 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