This commit is contained in:
2024-10-25 21:05:32 +01:00
parent 6424899afd
commit f6c136cfd6
25 changed files with 334 additions and 333 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ ildtPropagate lf rf x (LDT v l r) = LDT v (imap (go lf x) l) (imap (go rf x) r)
ldtPropagateIndices :: LabelDoubleTree b a -> LabelDoubleTree b (a, [Either Int Int])
ldtPropagateIndices (LDT x l r) = LDT (x,[]) (imap (f Left) l) (imap (f Right) r)
where
f e i (y,t) = (y, fmap (second (e i:)) $ ldtPropagateIndices t)
f e i (y,t) = (y, second (e i:) <$> ldtPropagateIndices t)
-- conceptually, in a tree growing from left to right,
-- bottom -> top is equated with left -> right.