[Haskell-cafe] List all multiply/add combinations
Rune Harder Bak
rune at bak.dk
Sat Nov 17 15:28:55 CET 2012
Given a list of numbers of fixed length I need to list all possible
values (and the associated computation) you get by
inserting +,-,*,/ between the numbers, and also set parentheses where
It shouldn't list computations with unnecessary parentheses.
Example list of length 3 [a,b,c] and only with + and *:
What would be a good way to do this, and a good representation in Haskell?
More information about the Haskell-Cafe