lua-users home
lua-l archive

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


> But limited use of 'functional idioms' can make
> mostly-imperative programs easier to read and write.
>
> -- sort in the wrong order
> table.sort(T,|x,y|(x > y))
>

Easier to write, maybe.  But really easier to read than this?

down = function(x,y) return x>y end
table.sort(T,down)