toint(tostring(6-4)+tostring(3+1)) |
|
[
[ (number_1, operation_1, priority_1),
(number_2, operation_2, priority_2),
...,
(number_n, '#', 0) ],
[ (number_1', operation_1', priority_1'),
(number_2', operation_2', priority_2'),
...,
(number_n', '#', 0) ],
...
] |
[ (5.0, '+', 1), (1.0, '-', 3), (3.0, '*', 2), (4.0, '/', 4), (2.0, '#', 0) ] --> [ (5.0, '+', 1), (1.0, '-', 3), (3.0, '*', 2), (2.0, '#', 0) ] --> [ (5.0, '+', 1), (-2.0, '*', 2), (2.0, '#', 0) ] --> [ (5.0, '+', 1), (-4.0, '#', 0) ] --> [ (1.0, '#', 0) ] |
import List (delete) gen 1 ls = [ (x, delete x ls, show x) | x <- ls ] |
| Regarding gen 1, I'm not sure, but I think you could do... |
| and only addition, subtraction, multiplication and/or division |
|
|