checkMinElements function

void checkMinElements(
  1. String name,
  2. List<double> arr
)

Implementation

void checkMinElements(String name, List<double> arr) {
  invariant(arr.length >= 2,
      ['%s must have at least 2 elements. (%s)', name, arr.toString()]);
}