First commit on new machine, some hlinting

This commit is contained in:
2025-12-21 18:43:52 +00:00
parent eac80d2b43
commit 2fbaa47c0b
7 changed files with 14 additions and 11 deletions
+3 -2
View File
@@ -197,11 +197,12 @@ rightChildList t = foldl' f l (reverse $ t ^.. dtRight . each . dtValue . _2)
leftRightCombine :: DTComb a -> DTComb a -> DTree a -> DTree a -> Maybe (DTree a)
leftRightCombine f f' t1 t2 = f t1 t2 <|> checkdepth t1 t2
where
checkdepth t t'@(DT x ls rs) = fromMaybe (checktop t t') $ do
--checkdepth t t'@(DT x ls rs) = fromMaybe (checktop t t') $ do
checkdepth t t'@(DT x ls rs) = fromMaybe (f' t t') $ do
t'' <- safeHead ls
tx <- checkdepth t t''
return $ Just $ DT x (tx : tail ls) rs
checktop t t' = f' t t'
--checktop t t' = f' t t'
joinItemsInList :: (a -> a -> Maybe a) -> [a] -> [a]
joinItemsInList f = fst . h . ([],)