Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a bug reported by Leon Smith:

  • Loading branch information...
commit ca2f7ee3c2cce215809ab24418a52f836390debf 1 parent 9b6c144
@spl authored
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))
Please sign in to comment.
Something went wrong with that request. Please try again.