To work on the exercises, you will need these pieces of software:
See Real World Ocaml, 2nd Ed.: Installation Instructions for how to install and configure
OPAMfor your operating system.
The OCaml compiler
See a list of available versions:
Switch to that version. If, for example, the latest version is 4.08.0, you will run:
opam switch 4.08.0
Install extended standard libraries and test libraries
Some exercises use only the OCaml standard library, and some use the extended libraries by Jane Street called Base and Core_kernel.
The test library is called OUnit, and some exercises additionally use the QCheck library for property-based tests.
opam install base core_kernel ounit qcheck
Install and use interactive shell
A summary of Setting up and using
opam install utop
Place the following in the file
.ocamlinitin your home directory should contain something like:
#use "topfind";; #require "base";; open Base