Jump to content

Matrix multiplication: Difference between revisions

added Ol
(added Ol)
Line 2,954:
a * b</lang>
 
 
=={{header|Ol}}==
{{trans|Scheme}}
This version works on lists of lists:
<lang ol>
(define (matrix-multiply matrix1 matrix2)
(map
(lambda (row)
(apply map
(lambda column
(apply + (map * row column)))
matrix2))
matrix1))
</lang>
 
> (matrix-multiply '((1 2) (3 4)) '((-3 -8 3) (-2 1 4)))
((-7 -6 11) (-17 -20 25))
 
=={{header|OxygenBasic}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.