1. Maxime Henrion
  2. huffman

Commits

Maxime Henrion  committed dbdc788

Fix a warning by not bringing an unused binding into scope.

  • Participants
  • Parent commits 67938ec
  • Branches default

Comments (0)

Files changed (1)

File Data/Compression/Huffman.hs

View file
  • Ignore whitespace
 -- Derive the binary code from a huffman tree.
 code :: HuffmanTree a -> [(a,[Bit])]
 code = code' []
-  where code' bits Empty      = []
+  where code' _    Empty      = []
         code' bits (Leaf x)   = [(x,bits)]
         code' bits (Node l r) = map (second (Zero:)) (code' bits l) ++
                                 map (second (One:)) (code' bits r)