Browse files

Fix a bug reported by Leon Smith:

  • Loading branch information...
1 parent 9b6c144 commit ca2f7ee3c2cce215809ab24418a52f836390debf @spl committed Apr 2, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 IncrementalTreeFold.lhs
View
2 IncrementalTreeFold.lhs
@@ -142,7 +142,7 @@ I use the datatype <code>Alg</code> here to contain the <a href="http://www.alph
<pre>
> filter :: (a -> Bool) -> Tree a -> [a]
-> filter f = fold (Alg [] (\x lr rr -> if f x then [x] else [] ++ lr ++ rr))
+> filter f = fold (Alg [] (\x lr rr -> (if f x then [x] else []) ++ lr ++ rr))
> ord :: Tree Char -> Tree Int
> ord = fold (Alg Tip (\x lt rt -> Bin (Char.ord x) lt rt))

0 comments on commit ca2f7ee

Please sign in to comment.