I'm looking for an elegant way to generate a list of all pruned trees
where each pruned tree has one of its leaves removed.  Something like
this:

data Leaf = ...

data Tree = Leaf Leaf | Branch [Tree]

prunedSubTrees :: Tree -> [(Leaf, Tree)]    -- [(the leaf removed, the
pruned tree)]

Any suggestions?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to