sum<T extends num> function
Implementation
T sum<T extends num>(List<T> l) {
if (l.isEmpty) {
return 0.0 as T;
}
return l.reduce((acc, val) => (acc).toDouble() + (val).toDouble() as T);
}
T sum<T extends num>(List<T> l) {
if (l.isEmpty) {
return 0.0 as T;
}
return l.reduce((acc, val) => (acc).toDouble() + (val).toDouble() as T);
}