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
you please.
It shouldn't list computations with unnecessary parentheses.
Example list of length 3 [a,b,c] and only with + and *:
a*b+c, a*(b+c),a*b*c,a+b*c,(a+b)*c,a+b+c

What would be a good way to do this, and a good representation in Haskell?

Best,
Rune

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

Reply via email to