Commit before unifying placements in rooms (in/out)

This commit is contained in:
2022-06-11 12:37:56 +01:00
parent ad576014fb
commit 7b00867f6d
6 changed files with 24 additions and 22 deletions
+6
View File
@@ -13,6 +13,7 @@ module TreeHelp
, applyToSubtree
, applyToSubforest
, treeFromPost
, treePost
, treeFromTrunk
, splitTrunk
, applyToRandomNode
@@ -36,6 +37,11 @@ Safe. -}
treeFromPost :: [a] -> a -> Tree a
treeFromPost xs = treeFromTrunk xs . pure
{- | Creates a linear tree from a list.
Unsafe. -}
treePost :: [a] -> Tree a
treePost xs = treeFromPost (init xs) (last xs)
{- | Creates a tree with one trunk branch,
input as a list, that ends in another tree. -}
treeFromTrunk