Haskell Core Libraries (base package)ParentContentsIndex
Data.Tree
Portability portable
Stability experimental
Maintainer libraries@haskell.org
Description

Multi-way trees (aka rose trees) and forests.

Also included are neat presentations for trees and forests.

Synopsis
data Tree a = Node a (Forest a)
type Forest a = [Tree a]
flatten :: Tree a -> [a]
levels :: Tree a -> [[a]]
Documentation
data Tree a
Multi-way trees, also known as rose trees.
Constructors
Node a (Forest a) a value and zero or more child trees.
Instances
Functor Tree
(Eq a) => Eq (Tree a)
(Show a) => Show (Tree a)
type Forest a = [Tree a]
flatten :: Tree a -> [a]
The elements of a tree in pre-order.
levels :: Tree a -> [[a]]
Lists of nodes at each level of the tree.
Produced by Haddock version 0.4