Matrix multiplication: Difference between revisions

Line 2,026:
return concatMap(a, function (aRow) {
return [concatMap(bt, function (bCol) {
return [sumdotProduct(zipWith(prod, aRow, bCol))];
})];
});
}
// [[n]] -> [[n]] -> [[n]]
function dotProduct(xs, ys) {
return sum(zipWith(product, xs, ys));
}
 
Line 2,075 ⟶ 2,080:
 
// product :: n -> n -> n
function prodproduct(a, b) {
return a * b;
}
9,655

edits