Difference between revisions of "Coroutine.wrap"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
m (Function -> Function (type)) |
||
Line 3: | Line 3: | ||
|args=[[function]] | |args=[[function]] | ||
|api=Coroutine | |api=Coroutine | ||
− | |returns=[[function]] coroutine | + | |returns=[[Function (type)|function]] coroutine |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Creates and Returns a Coroutine in the form of a function. | |desc=Creates and Returns a Coroutine in the form of a function. |
Revision as of 18:50, 30 November 2012
Function coroutine.wrap | |
Creates and Returns a Coroutine in the form of a function. | |
Syntax | coroutine.wrap(function) |
Returns | function coroutine |
Part of | ComputerCraft |
API | Coroutine |
Examples
Example | |
Runs a created coroutine. | |
Code |
local func = coroutine.wrap(print) |
Output | Hello World! |