Allow for assigning attach items orientations

This commit is contained in:
2024-09-30 16:09:56 +01:00
parent fd8adcea92
commit d8d3a01f06
10 changed files with 143 additions and 69 deletions
+5
View File
@@ -49,6 +49,11 @@ instance Foldable DoubleTree where
instance Functor (LabelDoubleTree b) where
fmap f (LDT x l r) = LDT (f x) (fmap (second $ fmap f) l) (fmap (second $ fmap f) r)
instance Bifunctor LabelDoubleTree where
second = fmap
first f (LDT x l r) = LDT x (map (first f . second (first f)) l)
(map (first f . second (first f)) r)
makeLenses ''DoubleTree
makeLenses ''LabelDoubleTree
deriveJSON defaultOptions ''DoubleTree