Huffman coding in OCaml