mirror of
https://github.com/rgleichman/glance.git
synced 2024-08-17 19:00:31 +03:00
6 lines
105 B
Haskell
6 lines
105 B
Haskell
factorial :: (Num t, Eq t) => t -> t
|
|
factorial x =
|
|
if x == 0
|
|
then 1
|
|
else x * factorial (x - 1)
|