If you write in imperative style (using expressions for their side effect and discarding their return values) then you separate statements with a ;. But for code written in functional style, there will be no ;'s.
Then ;; is used to separate statements at the top level. But in most of the cases when a new top level statement begins, OCaml can understand this anyway and you can omit the ;;. Or use the ;; if you prefer that style.
So, imperative code is as full of ;'s as C code, and toplevel use of ;; is a stylistic issue.
Then ;; is used to separate statements at the top level. But in most of the cases when a new top level statement begins, OCaml can understand this anyway and you can omit the ;;. Or use the ;; if you prefer that style.
So, imperative code is as full of ;'s as C code, and toplevel use of ;; is a stylistic issue.
https://ocaml.org/learn/tutorials/structure_of_ocaml_program...