Scala: Exercise 4: Huffman Coding