vault backup: 2023-09-12 16:35:48
This commit is contained in:
@ -247,3 +247,16 @@ val or3-simple: bool*bool*bool -> bool = <fun>
|
||||
```Ocaml
|
||||
let time_difference (d1, md1, sd1, pos1) (d2, md2, sd2, pos2)
|
||||
```
|
||||
|
||||
## Exercise 4.2
|
||||
```Ocaml
|
||||
let rec suite n = let a = 0 in
|
||||
if n <= 0 then
|
||||
a
|
||||
else
|
||||
a + suite (4*(n-1) - 1);;
|
||||
|
||||
|
||||
let rec sequence = function
|
||||
| 0 -> 1
|
||||
| n -> 4* sequence(n-1) - 1;;
|
Reference in New Issue
Block a user