Commit before changing logging of placement spots
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user