Re:Using Python generators for real work [pdf]
by davidhollander on Sunday January 23, 2011 @07:06PM
(#2133734)
Here is some older material on pipeline coding in Lua you might be interested in that describes this problem in terms of Filters, Sources, and Sinks: http://lua-users.org/wiki/FiltersSourcesAndSinks
LuaSocket implementation of the above: http://w3.impa.br/~diego/software/luasocket/ltn12.html