updateComputations4to1 function

void updateComputations4to1(
  1. int n,
  2. List<Signal<int>> sources,
  3. ReactiveFramework framework
)

Implementation

void updateComputations4to1(
  int n,
  List<Signal<int>> sources,
  ReactiveFramework framework,
) {
  int Function() get1 = sources[0].read;
  void Function(int) set1 = sources[0].write;
  int Function() get2 = sources[1].read;
  int Function() get3 = sources[2].read;
  int Function() get4 = sources[3].read;
  framework.computed(() => get1() + get2() + get3() + get4());
  for (var i = 0; i < n; i++) {
    set1(i);
  }
}