Solution to the 99 OCaml Problems.
The problems are divided into 7 sections:
- Lists
- Arithmetic
- Logic and Codes
- Binary Trees
- Multiway Trees
- Graphs
- Miscellaneous
Make sure you've OCaml installed.
git clone https://github.com/clovisphere/99-OCaml-Problems.git
cd 99-OCaml-Problems/lists
utop # or use `ocaml` to access the REPL
Inside the REPL, do the following:
#use "pset1.ml";; # - Read, compile and execute source phrases from the given file.
last [];; # - None
last [1];; # - Some 1
last [1; 2; 3];; # - Some 3
#quit;; # - quit/exit REPL
Clovis Mugaruka
Copyright ©️ 2023, Clovis Mugaruka.
Released under the MIT License.