mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
7 lines
182 B
Haskell
7 lines
182 B
Haskell
fakAcc :: (Eq a, Num a) => a -> a -> a
|
|
fakAcc n acc = if (n==0)
|
|
then acc
|
|
else fakAcc (n-1) (n*acc)
|
|
|
|
fak :: (Eq a, Num a) => a -> a
|
|
fak n = fakAcc n 1
|