vault backup: 2023-09-14 16:32:40

This commit is contained in:
2023-09-14 16:32:40 +02:00
parent 23016a56fd
commit 910b63a9a4
3 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,4 @@
<center><img src="https://gitea.louisgallet.fr/lgallet/epicours/raw/branch/main/Algo/S%C3%A9minaire/assets/functions-meme.jpg " width=auto height=400 /> </center>
## 2.1. One parameter function
```Ocaml
# let successor x=x+1;;

View File

@ -84,9 +84,11 @@ let rec odd n =
else
even (n-1);;
let rec even n =
and even n =
if n = 0 then
true
else
add (n-1);;
val add : int -> bool = <fun>
val even : int -> bool = <fun>
```