Implementing examples in OCaml as I read Expert F#