title: How to multiply two matrices using a list of lists in Io language?
body: <p>I am learning the Io language and would like to know how to multiple matrices together using lists of lists.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>mA := List clone
  mA := list(list(1, 2, 3), list(4, 5, 6), list(7, 8, 9))
  mB := List clone
  mB := list(list(1, 2, 3), list(4, 5, 6), list(7, 8, 9))
  mC := List clone
  mC := list(list(0, 0, 0), list(0, 0, 0), list(0, 0, 0))
  
  i := 0
  j := 0
  k := 0
  
  for(i, 0, mA size,
      for(j, 0, mB size (at(0)),
          for(k, 0, mB size,
              mC atPut(mC at(i) at(j), mC at(i) at(j) + mA at(i) at(k) * mB at(k) at(j))
          )
      )
  )
  </code></pre>
  
  <p>When I run this code through it says there is an error saying "nil does not respond to '*'". So where I am actually multiplying inside the nested for loops, it's going into the list out of bounds. At least that is what I think it is doing, therefore the error. I'm not really sure what else to change the for loops to. I've even changed them to 2 and 3 since that's the size of the matrix lists I am trying to test, but got the same error.</p>