API coroutine.create

Creates a coroutine capable of yielding.
 co = coroutine.create(workload)
 resumeFunc = coroutine.wrap(workload)
==Arguments==
:;workload: - A function that may yield with ().
==Returns==
:;co: - A complete coroutine usable with the coroutine library.
:;resumeFunc: - A single function to begin/resume the workload.
==Details==
* The workload is suspended until begun or resumed by or resumeFunc().
==Example==
Yield part-way during a workload.
local function workload()
	-- do something
 coroutine.yield()
 -- do something after resuming
end
local resumeFunc = coroutine.wrap(workload)
resumeFunc() -- top of the function
-- do something
resumeFunc() -- from yield() onward
==External links==
* Roberto lerusalimschy 2003, Programming in Lua, Chapter 9.1: Coroutine Basics.