
17 May
2016
17 May
'16
5:19 p.m.
On Tue, 17 May 2016 17:03:31 -0400
David Feuer
Daniel Wagner would like to add the following straightforward function to Data.Tree. I think this is a grand idea.
foldTree :: (a -> [b] -> b) -> Tree a -> b foldTree f = go where go (Node x ts) = f x (map go ts)
+1 Nice, simple, and useful. -- Michael Walker (http://www.barrucadu.co.uk)