[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Proposal] Lua-y lambda syntax
- From: "Soni L." <fakedme@...>
- Date: Thu, 27 Apr 2017 15:39:22 -0300
On 2017-04-27 03:12 PM, Egor Skriptunoff wrote:
On Thu, Apr 27, 2017 at 8:59 PM, Soni L. <fakedme@gmail.com
<mailto:fakedme@gmail.com>> wrote:
You need to use select() if you want multiple return values.
That's awkward.
local function nop(...) = select(1, ...)
local function swap(a,b) = nop(b,a)
It's the best way to add lambdas without introducing wildly different
syntax.
--
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.