Add first compo

This commit is contained in:
2021-04-14 12:00:12 +02:00
parent c42c5069ea
commit ec7e304b75
15 changed files with 33 additions and 226 deletions
+4 -1
View File
@@ -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)