Chapters 3 and 4 of the book develop the required tools for a small and trivial language of numbers and booleans. You can find the OCaml implementation of this language on book’s website. And you can find my Rust implementation at arith.rs.