Purely functional data structures for OCaml, translated from Chris Okasaki's book "Purely Functional Data Structures"