Commit before changing logging of placement spots

This commit is contained in:
2025-09-29 21:58:02 +01:00
parent 9ed6d75853
commit bf9a2250da
14 changed files with 294 additions and 288 deletions
+5
View File
@@ -26,6 +26,7 @@ module TreeHelp (
updateRandNode,
safeUpdateSingleNode,
numTraversable,
treeAttachDeep,
) where
import Control.Lens
@@ -188,3 +189,7 @@ numTraversable = snd . mapAccumL f 0
-- untested
inorderNumberTree :: Tree a -> Tree (a, Int)
inorderNumberTree = numTraversable
treeAttachDeep :: Tree a -> Tree a -> Tree a
treeAttachDeep t (Node y (z:zs)) = Node y (treeAttachDeep t z:zs)
treeAttachDeep t (Node y []) = Node y [t]