
11 Jun
2009
11 Jun
'09
1:37 p.m.
Example understood. Thanks.
Is there a module for binary trees?
Michael
--- On Wed, 6/10/09, wren ng thornton
Here's a function from Data.Tree:
unfoldTree :: (b -> (a, [b])) -> b -> Tree a Build a tree from a seed value
Could someone please give me a brief example of usage.
Data.Tree> let t = unfoldTree (\i -> (show i, [i`div`2..i-1])) Data.Tree> putStr . drawTree $ t 8 -- Live well, ~wren _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe