[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Ternary operator patch
- From: Benoit Germain <bgermain@...>
- Date: Thu, 16 Sep 2010 09:47:52 +0200
> -----Message d'origine-----
> De : lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> De la part de steve donovan
> Envoyé : jeudi 16 septembre 2010 09:21
> À : Lua mailing list
> Objet : Re: Ternary operator patch
>
> Just to be different, how about a pseudo-function
> choose(cond,val1,val2) with the appropriate lazy evaluation?
I wonder how one could use such a function in an expression issuing multiple return values?
Would this be easily understood?
a,b = choose(condition,(1,2),(3,4))
Benoit.
- References:
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Henk Boom
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Geoff Leyland
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Jonathan Castello
- Re: Ternary operator patch, Roberto Ierusalimschy
- Re: Ternary operator patch, Alexander Gladysh
- Re: Ternary operator patch, steve donovan