[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Random thought: short lambda syntax (no patching required!)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 26 May 2014 11:44:58 +0200
On Mon, May 26, 2014 at 11:02 AM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
> Unfortunately for this particular case, relational metamethods only support returning a boolean. You can’t build expressions with them (but you can with the arithmetic operators)
Thanks, Geoff - that's exactly the problem I hit, so that would have
to be expressed as a function Gt(_1,_2). While an interesting
experiment, I found string lambdas to be less problematic, if you
accept their limitation: they cannot capture (without expensive
trouble) any upvalues.