Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

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 x`x`

`n`

times.

replicateTree :: Int -> a -> Tree a Source #

creates a tree of size `replicateTree`

n a`n`

filled with `a`

.

`>>>`

. | +- . | `- . | `- .`putStr (drawTree (replicateTree 4 "."))`

n > 0 ==> length (replicateTree n x) == n