ah yes the _classic_ ! i was kind of pleasantly surprised to see 'pragmatically' functional OCaml used for exposition, and thought of posting here for more insightful discussion :)
Purely functional data structures for OCaml, translated from Chris Okasaki's book "Purely Functional Data Structures":