| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Tree.Replicate
Description
Functions for creating rose trees (from Data.Tree) of a specified size.
- replicateA :: Applicative f => Int -> f a -> f (Tree a)
- replicateTree :: Int -> a -> Tree a
Documentation
replicateA :: Applicative f => Int -> f a -> f (Tree a) Source #
replicates the action replicateA n xx n times.
replicateTree :: Int -> a -> Tree a Source #
creates a tree of size replicateTree n an filled with a.
>>>putStr (drawTree (replicateTree 4 ".")). | +- . | `- . | `- .
n > 0 ==> length (replicateTree n x) == n