In OCaml from the Very Beginning John Whitington takes a no-prerequisites approach to teaching a modern general-purpose programming language. Each small, self-contained chapter introduces a new topic, building until the reader can write quite substantial programs. There are plenty of questions and, crucially, worked answers and hints.
OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml. It is suitable both for formal use within an undergraduate or graduate curriculum, and for the interested amateur.
John Whitington founded a company which builds software for electronic document processing. He studied, and taught, Computer Science at Queens’ College, Cambridge. His books include the textbooks PDF Explained (O'Reilly, 2012), OCaml from the Very Beginning (Coherent, 2013), and Haskell from the Very Beginning (Coherent, 2019) and the Popular Science book A Machine Made this Book: Ten Sketches of Computer Science (Coherent, 2016).
Reminds me during my late first year at college where I reset the programming knowledge acquired in the high school that was used for competitive programming and start over from the computational thinking through functional notation and LISP. that was kind of fun.
OCaml-curious? This quick and easy read gives you a taste of this fascinating programming language.
Note that the Kindle edition has some wonky formatting whenever data types are shown that the publisher should have noticed, but otherwise doesn't detract from the substance of the book itself.