plus method

List<double> plus(
  1. List<double> other
)

Element-wise sum with other.

Prefer this over the + operator: List defines its own operator + (concatenation), which shadows the extension operator below.

Implementation

List<double> plus(List<double> other) {
  return List.generate(length, (i) => this[i] + other[i]);
}