Posted on February 2020
Why would you want to use OCaml? “What makes OCaml special is that it occupies a sweet spot in the space of programming language designs. It provides a combination of efficiency, expressiveness and practicality that is matched by no other language” .
There are also some great talks by Yaron Minsky about this . In short, with OCaml and variants such as Reason you get:
Here is a toy program to show the process. For this to work, you need OCaml installed. See the install guide from the OCaml website  on how to do this.
You also need to have the OCaml package js_of_ocaml installed. This can be done with opam, the fantastic OCaml package manager.
opam install js_of_ocaml
Create a simple OCaml program
let () = print_endline "Hello World" let () = Printf.printf "Created %d from OCaml\n" 123
ocamlc hello.ml -o hello.byte js_of_ocaml hello.byte -o hello.js
hello.js. If you have Node.js, you can run hello.js
Else, run the JS file in your browser by including it in a html page
The print function in OCaml translates to a
Have a look at the above sample page here.
 ocsigen - js_of_ocaml
https://ocsigen.org/home/intro.html, Accessed 2020-02-12
 Real World OCaml. Online book by Yaron Minsky, Anil Madhavapeddy & Jason Hickey
https://dev.realworldocaml.org/prologue.html, Accessed 2020-02-12
 Why Ocaml? Talk by Yaron Minsky, Harvard, 2015
https://www.youtube.com/watch?v=v1CmGbOGb2I, Accessed 2020-02-12
 Caml Trading. Talk by Yaron Minsky, Carnegie Mellon University, 2009
https://youtu.be/FnBPECrSC7o?t=2496, Accessed 2020-02-12
 OCaml website
 CueKeeper, by Thomas Leonard
 Functional Programming in OCaml. Textbook for CS3110 at Cornell.
https://www.cs.cornell.edu/courses/cs3110/2020sp/textbook/, Accessed 2020-02-23
 Chemoinformatics and structural bioinformatics in OCaml. Berenger, Zhang and Yamanishi
https://jcheminf.biomedcentral.com/track/pdf/10.1186/s13321-019-0332-0, Accessed 2020-02-23
Caravaggio, The Cardsharps (Italian: Bari), c 1594Edit