Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. data HuffTree
  2. = Leaf Char
  3. | HuffTree |*| HuffTree
  4. deriving (Eq, Show)
  5.  
  6. plant :: [(Char,Int)] -> HuffTree
  7. plant [(x,y)] = (Leaf x)
  8. plant ((x,y):xs) = plant xs |*| (Leaf x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement