Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Fix a bug reported by Leon Smith:
Browse files Browse the repository at this point in the history
  • Loading branch information
spl committed Apr 2, 2009
1 parent 9b6c144 commit ca2f7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IncrementalTreeFold.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ca2f7ee

Please sign in to comment.