cat<<EOF
fib = coroutine.create(function ()
a, b, c = 0, 1, true
while c do
c = coroutine.yield(a)
a, b = b, a + b
end
end)
x, y = coroutine.resume(fib)
while x and y < 100 do
print(y)
x, y = coroutine.resume(fib, true)
end
coroutine.resume(fib, false)
EOF
}
lua <(lu)