I want this result:
[[1,2],[1,3],[1,4,5,6],[1,4,5,7]]
from the following set of objects:
var andsOrs =
Ands(items: [
single(1),
Ors(items: [
single(2),
single(3),
Ands(items: [
single(4),
single(5),
Ors(items: [
single(6),
single(7),
]),
]),
]),
]);
I'm struggling to write a function that would produce the output, can anyone help? Any modern object oriented language would be fine really, c#, js, dart, c++.