Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
More OCaml: Algorithms, Methods, and Diversions
Purchase options and add-ons
In More OCaml John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints.
More OCaml will appeal both to existing OCaml programmers who wish to brush up their skills, and to experienced programmers eager to explore functional languages such as OCaml. It is hoped that each reader will find something new, or see an old thing in a new light. For the more casual reader, or those who are used to a different functional language, a summary of basic OCaml is provided at the front of the book.
Chapters:
- Summary of Basic OCaml
- Our Working Environment
- Unravelling "Fold"
- Being Lazy
- Named Tuples with Records
- Generalized Input/Output
- Streams of Bits
- Compressing Data
- Labelled and Optional Arguments
- Formatted Printing
- Searching for Things
- Finding Permutations
- Making Sets
- Playing Games
- Representing Documents
- Writing Documents
- Pretty Pictures
- Adding Text
- Answers to Questions
- Hints for Questions
- Coping with Errors
- ISBN-100957671113
- ISBN-13978-0957671119
- Publication dateAugust 26, 2014
- LanguageEnglish
- Dimensions7.5 x 0.49 x 9.25 inches
- Print length216 pages
Frequently bought together

Customers who bought this item also bought
Editorial Reviews
Review
From the Author
About the Author
Product details
- Publisher : Coherent Press (August 26, 2014)
- Language : English
- Paperback : 216 pages
- ISBN-10 : 0957671113
- ISBN-13 : 978-0957671119
- Item Weight : 13.4 ounces
- Dimensions : 7.5 x 0.49 x 9.25 inches
- Best Sellers Rank: #1,472,297 in Books (See Top 100 in Books)
- #1,082 in Computer Programming Languages
- #4,565 in Programming Languages (Books)
- Customer Reviews:
About the author

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).
Customer reviews
- 5 star4 star3 star2 star1 star5 star76%17%0%7%0%76%
- 5 star4 star3 star2 star1 star4 star76%17%0%7%0%17%
- 5 star4 star3 star2 star1 star3 star76%17%0%7%0%0%
- 5 star4 star3 star2 star1 star2 star76%17%0%7%0%7%
- 5 star4 star3 star2 star1 star1 star76%17%0%7%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- the chapters are no longer reviewed at the end
- this book contains two very useful practical examples, not easily found elsewhere:
-- Compression algorithms
-- Generating PDF files
Building on the ground work of « OCaml from the very Beginning », the book introduces a few new language level concepts: laziness, records, labelled arguments and starts to introduce some elements of the module system. Regarding the latter there is no treatment of functors yet, which only raises the hopes that the book series is not over.
As its subtitle hints, the book is not only about OCaml but also about programming techniques. Using engaging examples – but without falling in the trap of only teaching how to deal with the latest technological fad – the book also unknowingly instructs you how to design data structures and programs using a non-dogmatic mix of imperative and functional programming techniques. Writing codecs, compressing data, searching data, implementing and comparing a set data structure using different approaches, analyzing the rules of a game through its game trees are a few examples of the tasks that are addressed. The book ends by showing how to generate and typeset PDFs from scratch, a topic the www can be surprisingly quiet about when one considers the widespread usage of the file format.
The book starts with a handy summary of OCaml, enough to get started right away. The first half of the book walks the reader through a series of chapters introducing language features (lists, user-defined datatypes, records, labels, modules) by way of applied examples and exercises. The second half of the book covers an extended example of PDF generation, that gives a glimpse inside the PDF format. Throughout the book, useful part of the standard library are covered.
I found the exposition very pragmatic (with a mix of imperative and functional techniques) and effective. The programs used as example and exercises are fun and challenging. Extending and running programs that exercise new knowledge is very enlightening and empowering.
All exercises come with hints and answers, and all the code is available online, there is even a section, at the end, documenting common error messages.
I heartily recommend this book to anybody willing to start learning OCaml, it is the best on-ramp to more advanced material.
By the end of the book you should be able to understand how to write an OCaml program to generate PDF files, a non trivial problem whose solution exercises a pretty wide gamut of OCaml features and idioms.
After finishing this book you will probably find yourself asking a lot of questions about the language... that's because "MO" (as OFTVB before it) is an introductory book that does not go in depth about every detail of the language and its ecosystem. Depending on were you are in your journey of learning OCaml that could actually be a good thing.
Top reviews from other countries
I also liked the fact that the OCaml distribution is enough to get started, no need to download and install other software.
Hopefully there will be more books from the same author !








