vault backup: 2023-09-15 16:21:59

This commit is contained in:
Louis Gallet 2023-09-15 16:21:59 +02:00
parent 3f37a1ccb5
commit 6046e77572
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -369,8 +369,11 @@ let rec multiply x y =
## Exercise 4.11
```Ocaml
let rec puissance = function
|n when n = 0 -> 1
|n when n = 1 -> x
|n ->
let rec puissance x n =
if n = 0 then
1
else if n = 1 then
x
else
x*puissance x (n-1);;
```