Define functions to convert the Huffman code to binary format. For instance, ‘LRRL’ -¿ ‘0110’. (Haskell) module Types (Tree(Leaf,Node), Bit(L,R), HCode, Table ) where data Tree = Leaf Char Int | Node...



  • Define functions to convert the Huffman code to binary format. For
    instance, ‘LRRL’ -¿ ‘0110’.  (Haskell)


  • module Types (Tree(Leaf,Node), Bit(L,R), HCode, Table ) where


    data Tree = Leaf Char Int | Node Int Tree Tree


    -- The types of bits, Huffman codes and tables of Huffman codes.


    data Bit = L | R deriving (Eq,Show)


    type HCode = [Bit]


    type Table = [(Char, HCode)]







Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here