Jump to content

Matrix multiplication: Difference between revisions

→‎JS ES6: Added a comment to the dotProduct function.
m (→‎JS ES6: Tidied)
(→‎JS ES6: Added a comment to the dotProduct function.)
Line 3,804:
// dotProduct :: Num a => [[a]] -> [[a]] -> [[a]]
const dotProduct = xs =>
// Sum of the products of the corresponding
// values in two lists of the same length.
compose(sum, zipWith(mul)(xs));
 
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.