This commit is contained in:
2022-06-10 20:53:01 +01:00
parent 1b7463f287
commit 6966e76206
14 changed files with 54 additions and 75 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ msafeUpdateSingleNode :: Monoid b => (a -> Bool) -> (Tree a -> (b, Tree a)) -> T
msafeUpdateSingleNode f g t = fromMaybe (mempty,t) $ listToMaybe $ mupdateSingleNodes f g t
msubMap :: Functor m => (a -> [m a]) -> [a] -> [m [a]]
msubMap f (x:xs) = (f x <&> fmap (: xs)) ++ ( (fmap (x :)) <$> msubMap f xs )
msubMap f (x:xs) = (f x <&> fmap (: xs)) ++ ( fmap (x :) <$> msubMap f xs )
msubMap _ [] = []
subMap :: (a -> [a]) -> [a] -> [[a]]