lua-users home
lua-l archive

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


Hallo,

On Wed, Sep 15, 2010 at 9:46 PM, David Manura <dm.lua@math2.org> wrote:
>
> The question of whether to postfix or not also comes up in list
> comprehensions [1]:
>
>  S = [2*x for x in range(101) if x**2 > 3]  # Python
>  var s = [2*i for (i in 100) if (i*i>3)]; // JavaScript
>  var s = for (i in [1..100][n | n*n > 3]) { 2*i } // JavaFX
>

     Two start with a bracket and one with a FOR, it accommodates my
brain well enough.

-- 
-alex
http://www.artisancoder.com/