vault backup: 2023-09-16 11:58:52
This commit is contained in:
@ -94,7 +94,7 @@ val add : int -> bool = <fun>
|
||||
val even : int -> bool = <fun>
|
||||
```
|
||||
|
||||
An accumulator is a thing that try to get our result. In CAML we trying to not use an accumulator in our program. In CAML the syntax for the accumulator (`inv`) is: (exemple with reverse_int exercise. See 4.9 - b)
|
||||
An accumulator is a variable used to stock temporary the intermediaries results of a recursive operation. In CAML the syntax for the accumulator (`inv`) is: (exemple with reverse_int exercise. See 4.9 - b)
|
||||
```Ocaml
|
||||
# let reverse_int =
|
||||
let rec rev inv = function
|
||||
|
Reference in New Issue
Block a user