A purely functional implemtation of huffman encoding, using Scala!