Skip to content

Commit

Permalink
Update data/tutorials/language/1ds_01_arrays.md
Browse files Browse the repository at this point in the history
Co-authored-by: Christine Rose <[email protected]>
  • Loading branch information
gpetiot and christinerose authored Jul 31, 2023
1 parent b58bffe commit 05be533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/tutorials/language/1ds_01_arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ To combine all the elements of an array into a single result, we can use the `Ar
Here is the signature of `Array.fold_left`:

```ocaml
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
# Array.fold_left;;
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a = <fun>
```

`fold_left f init a` computes `f (... (f(f init a.(0)) a.(1)) ...) a.(n-1)`
Expand Down

0 comments on commit 05be533

Please sign in to comment.