First commit on new machine, some hlinting
This commit is contained in:
@@ -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 . ([],)
|
||||
|
||||
Reference in New Issue
Block a user