vault backup: 2023-10-25 17:27:14

This commit is contained in:
2023-10-25 17:27:14 +02:00
parent b1df54d806
commit fef0e7e66d
2 changed files with 3 additions and 20 deletions

View File

@ -28,7 +28,7 @@ val sigma: (int -> int) -> int -> int = <fun>
```
# let rec map f = function
| [] -> []
|e::t -> f(e)::map f t ;;
|e::t -> f e::map f t ;;
val map : ('a -> 'b) -> 'a list -> 'b list = <fun>
```
@ -36,4 +36,5 @@ val map : ('a -> 'b) -> 'a list -> 'b list = <fun>
```
# let rec for_all p = function
| [] -> true
| e::t -> if p(e) then for_all p t else false;;
| e::t -> if p e && for_all p t;;
val for_all: ('a -> bool) -> 'a list -> bool = <fun>