realworldocaml/book

Example in "Functors"

benjub opened this issue · 0 comments

In "Functors", it is written

In order to apply the functor, we'll put the definition of Fqueue in a submodule called T, and then call Foldable.Extend on T:

but there is no mention of T in the example following that line. In the examples/ subdirectory of that chapter, that code is in the file extended_fqueue.ml.

On a few occasions, I found it a bit difficult to know which code snippet should be written in which file (admittedly, that information can be found by browsing the directories in this repository). In some places, I've seen code snippets written with the information of the file where they appear:

(* extended_fqueue.ml *)
include Fqueue
include Foldable.Extend(Fqueue)