_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Instead of attacking the problem textually, try to create a datatype which
would describe your expressions, then generate all values of this
datatype, filter those you don’t need, and convert the rest into Strings.
Currently your expressions are represented by “String” — conversion is
very cheap, but filtering is “hard” (since it boils down to parsing).
Binary trees would suit you better.
- [Haskell-cafe] List all multiply/add combination... Rune Harder Bak
- Re: [Haskell-cafe] List all multiply/add co... timothyhobbs
- Re: [Haskell-cafe] List all multiply/ad... Rune Harder Bak
- Re: [Haskell-cafe] List all multipl... Artyom Kazak
- Re: [Haskell-cafe] List all multipl... Artyom Kazak
- Re: [Haskell-cafe] List all multipl... Artyom Kazak
- Re: [Haskell-cafe] List all multipl... Artyom Kazak
- Re: [Haskell-cafe] List all multiply/add co... Rune Harder Bak
- Re: [Haskell-cafe] List all multiply/ad... Jonas Almström Duregård
- Re: [Haskell-cafe] List all multipl... Artyom Kazak
- Re: [Haskell-cafe] List all multipl... Stefan Klinger