What is the advantage of this circular implementation?
Is it faster than the simple one? Does it use less memory? Is it easier to write? Is it easier to understand?
I think all of the above is false, but I have a limited understanding of Haskell. Please correct me if I'm wrong.
> The algorithm isn’t single-pass in the sense of Adaptive Huffman Coding: it still uses the normal Huffman algorithm, but the input is transformed in the same traversal that builds the tree to transform it.
Limited understanding here too. Sounds like it's not really single pass anyway so it's not usable to process a stream in real-time either, before having all the data?
It's a weird claim about a single pass too. It's more of a "let's replace some iteration with building a tree of functions to call" and then pretends waking/executing that is not another pass.