[Haskell-cafe] Huffman Codes in Haskell

Max Rabkin max.rabkin at gmail.com
Tue Jun 22 18:02:27 EDT 2010

On Tue, Jun 22, 2010 at 10:18 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> Don Stewart wrote:
>>    http://hackage.haskell.org/package/huffman
>>    A simple and pure Haskell implementation of the Huffman encoding
>> algorithm.
> What the...?
> Oh, I see. It uses another package to handle the tricky sorting and
> searching stuff. Well, yeah, that would make the code a bit shorter... ;-)

Quicksort is naturally expressed using filter and (++), etc. Huffman
coding is naturally expressed in terms of priority queues, etc. Why is
using the right vocabulary OK in one case and not in the other?

This seems like an example of list-chauvinism -- what Chris Okasaki
calls a communal blind spot of the FP community in Breadth-First
Numbering: Lessons from a Small Exercise in Algorithm Design --


More information about the Haskell-Cafe mailing list