Matrix multiplication: Difference between revisions

Content added Content deleted
m (→‎{{header|Lambdatalk}}: small change)
Line 4,311:
<lang ruby>def matrix_mult(a, b)
a.map do |ar|
b.transpose.map do{ |bc| ar.zip(bc).map(&:*).inject(&:+) }
ar.zip(bc).map(&:*).inject(&:+)
end
end
end</lang>