Correct room link position numbering

This commit is contained in:
2021-11-22 16:42:19 +00:00
parent b4759e4a27
commit 5d9ea4b733
23 changed files with 184 additions and 85 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ import Data.Tree
expandTree :: CompTree a -> Tree a
expandTree (Node root extChildren) = case root of
Node (UseAll x) _ -> Node x (map expandTree extChildren)
Node (UseSome is x) _ -> Node x (map expandTree $ map (\i -> extChildren !! i) is)
Node (UseSome is x) _ -> Node x (map (expandTree . \i -> extChildren !! i) is)
Node (UseNone _) _ -> fmap _unCompose root
Node (PassDown x) xs -> Node x $ map (expandTree . (\ct -> Node ct extChildren)) xs
Node (PassDown x) xs -> Node x $ map (expandTree . (`Node` extChildren)) xs
Node (SplitDown x) xs -> Node x $ map expandTree $ zipWith Node xs
$ map (:[]) extChildren ++ repeat []