lua-users home
lua-l archive

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

> -----Message d'origine-----
> De : []
> 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))