lua-users home
lua-l archive

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


> How about:

function concat(list, sep, i, j)
...

which is basically Dirks suggestion. But it doesn't call the __concat metamethod at all. Theoretically __concat could return something else than a string.

PS: I just realised, my version just uses as many __concat operations or intermediatary objects than Dirks simple version. It's just that more intermediate result would consist of shorter whatevers(strings).