type-indexed-queues-0.1.0.0: Queues with verified and unverified versions.

Safe HaskellSafe
LanguageHaskell2010

Data.Tree.Replicate

Description

Functions for creating rose trees (from Data.Tree) of a specified size.

Synopsis

Documentation

replicateA :: Applicative f => Int -> f a -> f (Tree a) Source #

replicateA n x replicates the action x n times.

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

replicateTree n a creates a tree of size n filled with a.

>>> putStr (drawTree (replicateTree 4 "."))
.
|
+- .
|
`- .
   |
   `- .
n > 0 ==> length (replicateTree n x) == n