1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:30:03 +08:00
SpaceVim/bundle/plenary.nvim/scratch/coroutine_examples.lua
2022-05-16 22:20:10 +08:00

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()