RosettaCodeData/Task/Conditional-structures/Haskell/conditional-structures-1.hs

4 lines
66 B
Haskell

fac x = if x==0 then
1
else x * fac (x - 1)