
23 Jul
2011
23 Jul
'11
3:33 a.m.
2011/7/22 Александр
How can i make Monad type class instance for this tree? And can i make it on not?
You'll apply 'f' to every node in the tree. You'll need some sensible mechanism to merge the resulting trees. You might have an easier time for merging a slightly different tree type: Tree a = Leaf a | Node (Tree a) (Tree a)