Add first compo
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
{-|
|
||||
Combining and composing trees.
|
||||
-}
|
||||
module Dodge.Layout.Tree
|
||||
where
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
import System.Random
|
||||
-- Left elements get new children, Right elements inherit the children from the
|
||||
-- | 'Left' elements get new children, 'Right' elements inherit the children from the
|
||||
-- mapped over node
|
||||
expandTreeBy :: (a -> Tree (Either b b)) -> Tree a -> Tree b
|
||||
expandTreeBy f (Node x []) = fmap removeEither (f x)
|
||||
|
||||
Reference in New Issue
Block a user