mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:30:03 +08:00
15 lines
186 B
Lua
Vendored
15 lines
186 B
Lua
Vendored
|
|
local f = function(xyz)
|
|
print('calling 1', xyz)
|
|
local foo = coroutine.yield()
|
|
print('calling 2', foo)
|
|
return 5
|
|
end
|
|
|
|
local x = coroutine.wrap(f)
|
|
|
|
x('bar')
|
|
x('zap')
|
|
-- x()
|
|
-- x()
|