These examples using intervals are based on the examples in Chapters 4 and 9 of Real World OCaml. Some small modifications have been made to explain modules, but they are fundamentally the same as in the Real World OCaml book.