Difference between revisions of "Coroutine.wrap"
From ComputerCraft Wiki
m (Function -> Function (type)) |
(Missed dat stray function reference. ;_;) |
||
| Line 1: | Line 1: | ||
{{Function | {{Function | ||
|name=coroutine.wrap | |name=coroutine.wrap | ||
| − | |args=[[function]] | + | |args=[[Function (type)|function]] |
|api=Coroutine | |api=Coroutine | ||
|returns=[[Function (type)|function]] coroutine | |returns=[[Function (type)|function]] coroutine | ||
Revision as of 18:53, 30 November 2012
| Creates and Returns a Coroutine in the form of a function. | |
| Syntax | coroutine.wrap(function) |
| Returns | function coroutine |
| Part of | ComputerCraft |
| API | Coroutine |
Examples
| Runs a created coroutine. | |
| Code |
local func = coroutine.wrap(print) |
| Output | Hello World! |