lua-users home
lua-l archive

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


I never said that _I_ want that many elements. (In fact, I only need a handful, but this is really irrelevant. I'm not doing this to satisfy my immediate needs, I genuinely think the standard library will benefit from such an addition.)

My point was, one can never assume how much is enough.

--
With regards, Alex Ch

On 11.09.2022 21:27, bil til wrote:
But if you want to see the "mil of returned elements", why then not
use the approach of Egor?

You do not need to encapsulate this in such an ingenious sub-func.

You could as well just first invoke table.unpack, to see the elements
which you want to remove.

And then in the next step invoike table.move(a1, f, e, t, a1) to strip
these elements from a1?

These are just  2 lua commands without any for loop in lua?

Am So., 11. Sept. 2022 um 18:04 Uhr schrieb Alexander Chernoskutov
<alecherov@gmail.com>:
On 11.09.2022 20:41, bil til wrote:
   (who really is interestend in seeing all the removed elements? I
think this  would be quite a bizarre wish)
Coincidently, this is exactly my use case and the reason why I had
raised this discussion. So yea, the method of the core library should
always strive to be generic and unassuming.
With regards, Alex Ch