Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.14 KB | None | 0 0
  1. function send (x)
  2. coroutine.yield(x)
  3. end
  4.  
  5. local producer = coroutine.create(function ()
  6. while true do
  7.     send(io.read())
  8.     end
  9. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement