sum property

N get sum

Implementation

N get sum {
  var length = this.length;
  if (length == 0) return castElement(0);

  num total = first;

  for (var i = 1; i < length; ++i) {
    total += this[i];
  }

  return castElement(total);
}