Long multiplication: Difference between revisions
Content added Content deleted
m (→Functional (ES 5): Removed a couple of unused parameter names from a .reduce function) |
|||
Line 2,398:
// Javascript lacks an unbounded integer type
// so this multiplication function
//
Line 2,407:
digitProducts(digits(num1), digits(num2))
);
}▼
▲ }
// digitProducts :: [Int] -> [Int] -> [Int]
Line 2,436:
function largeIntegerString(lstColumnValues) {
var dctProduct = lstColumnValues
.reduceRight(function (a, x
var intSum = x + a.carried,
intDigit = intSum % 10;
|