Permalink
Browse files

Update usage.

  • Loading branch information...
1 parent 520bfb3 commit 6243cdbc80c1e0f546079fd5c1a4eb3a6ecd2208 @fffej committed Feb 14, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 huffman.clj
View
@@ -61,7 +61,7 @@
(defn huffman-coding-table
"Huffman encode the given sequence and return the huffman coding tree"
[s]
- (let [fl (map list (sort sort-by-second (map (fn [x] [(first x) (second x)]) (symbol-weights s))))]
+ (let [fl (map list (sort sort-by-second (map (fn [x] [(first x) (second x)]) (frequencies s))))]
(lookup (coding-tree fl))))
(defn compress

0 comments on commit 6243cdb

Please sign in to comment.