title: Confusion about lua corountine's resume and yield function
body: <p>I am learning lua by this <a href="https://www.youtube.com/watch?v=rjY2UbEqWII" rel="nofollow">video tutorial</a>, it has this piece of code:</p>
  
  <pre><code>co = coroutine.create(function()
      for i=1,5 do
        print(coroutine.yield(i))
      end
    end)
  
  print(coroutine.resume(co,1,2))
  print(coroutine.resume(co,3,4))
  print(coroutine.resume(co,5,6))
  print(coroutine.resume(co,7,8))
  print(coroutine.resume(co,9,10))
  print(coroutine.resume(co,11,12))
  </code></pre>
  
  <p>The output is like this:</p>
  
  <pre><code>true    1
  3   4
  true    2
  5   6
  true    3
  7   8
  true    4
  9   10
  true    5
  11  12
  true
  </code></pre>
  
  <p>But I don't understand how yield and resume passes parameters to each other and why yield doesn't output the first 1,2 that resume passes to it, could someone please explain? Thanks</p>