add factorial

This commit is contained in:
rnhmjoj 2016-11-25 17:37:02 +01:00
parent 6e73e737cc
commit 44aec1f56c
No known key found for this signature in database
GPG Key ID: 362BB82B7E496B7C

View File

@ -75,6 +75,10 @@ singletons [d|
max Z n = n
max n Z = n
max (S n) (S m) = S (max n m)
fact
fact Z = S Z
fact (S n) = (S n) × (fact n)
|]