leastCommonMultipleOfMany function
Returns the least common multiple (lcm) of many BigInt using Euclid's algorithm.
Implementation
int leastCommonMultipleOfMany(List<int> integers) {
if (integers.length == 0) {
return 1;
}
var lcm = integers[0].abs();
for (var i = 1; i < integers.length; i++) {
lcm = leastCommonMultiple(lcm, integers[i]);
}
return lcm;
}