author | Christian Urban <christian.urban@kcl.ac.uk> |
Wed, 21 Feb 2024 09:14:12 +0000 | |
changeset 959 | 64ec1884d860 |
parent 903 | 2f86ebda3629 |
permissions | -rw-r--r-- |
655 | 1 |
def fact(n) = |
735
fc2e3609d5e5
updatd
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
702
diff
changeset
|
2 |
(if n == 0 then 1 else n * fact(n - 1)); |
224
70198792c2aa
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3 |
|
655 | 4 |
|
903 | 5 |
write(fact(6)) |