On 6/12/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
Based on the sample output, I'm guessing that the desired output is "every tree which, when flattened, gives a permutation of a non-empty subset of the supplied list". This limits the output to trees with up to "n" leaves.
Branch (Branch (Leaf 1) (Leaf 3)) (Leaf 1),
If I'm guessing the desired output correctly, this must be a typo? I'd be tempted to solve the "list-only" problem first (generate all "sub-permutations" of a list), then solve the tree problem (generate all "un-flattenings" of a list). Colin DeVilbiss _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe