lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Trouble is, does this pattern ever appear in normal code? I find 
> it difficult to believe that calling a function that returns a 
> function to be called, and so on, chained in this manner, could 
> happen in real-world code.

Similar code is generated in chains of messages to objects, such as
	o:a():b():c()

Several libraries return the object as the result of messages to allow
this kind of chaining.