Mastering Higher Order Functions in OCaml: A Deep Dive