A huffman encoder written in a purely functional style, using Scala!