mirror of
https://github.com/rgleichman/glance.git
synced 2024-09-11 15:05:41 +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)
|