lua-users home
lua-l archive

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


I don't see why we need a feature for something that can easily be done already.

On Mon, Jul 3, 2017, 15:02 Soni L. <[email protected]> wrote:


On 2017-07-03 04:42 PM, Dirk Laurie wrote:
> 2017-07-03 21:35 GMT+02:00 Soni L. <[email protected]>:
>
>> That was a feature request. And that trick doesn't work for captures
>> beyond 1 without introducing nils or a massive performance hit.
> Would the requested feature make `pat/-2` drop the second capture
> or the first two captures?

The former (drop the second).

>
>> On 2017-07-03 04:31 PM, Dirk Laurie wrote:
>>> No. But you can have it so `pat / drop` does that.
>>>
>>>
>>> function drop(x,...) return ... end
>>>
>>> 2017-06-30 17:14 GMT+02:00 Soni L. <[email protected] <mailto:[email protected]>>:
>>>
>>>      So uh can I have it so `pat / -1` removes capture 1 from pat,
>>>      while leaving all others untouched?

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


--
--
Ryan <[email protected]>
Software Developer / System Administrator
https://hashbang.sh