summaryrefslogtreecommitdiffstats
path: root/TreeView.hs
diff options
context:
space:
mode:
Diffstat (limited to 'TreeView.hs')
-rw-r--r--TreeView.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/TreeView.hs b/TreeView.hs
index dff50e8..02cab58 100644
--- a/TreeView.hs
+++ b/TreeView.hs
@@ -206,7 +206,7 @@ unloadReadSubForests t = case rootLabel t of
unloadPartsWithFilename :: Forest TreeView -> Forest TreeView
unloadPartsWithFilename =
- map (rewriteTree f)
+ map rewriteTree
where
f x@Node{..} = case rootLabel of
TVMessagePart _ mp ->
@@ -216,10 +216,9 @@ unloadPartsWithFilename =
x { subForest = [] }
_ -> x
- rewriteTree :: (Tree a -> Tree a) -> Tree a -> Tree a
- rewriteTree f x =
+ rewriteTree x =
let x' = f x
- in x' { subForest = map (rewriteTree f) $ subForest x' }
+ in x' { subForest = map rewriteTree $ subForest x' }
findFirsts :: (a -> Bool) -> Forest a -> Forest a